Linux – Solve “Too many authentication failures for X” error

If you got the “Too many authentication failures for X” error on trying to connect to a server over ssh you can use the -o parameter to set the PubkeyAuthentication option to no. ssh -o PubkeyAuthentication=no root@host With that parameter your machine won’t try to send all your public keys any more on ssh connect. […]

SSH key authentication

Generate ssh key $> ssh-keygen Start ssh agent $> ssh-agent /bin/bash Add ssh key $> ssh-add ~/.ssh/id_rsa List all used ssh keys $> ssh-add -l Show public key $> cat ~/.ssh/id_rsa.pub Copy key to remote host via ssh $> ssh-copy-id -i id_rsa.pub ssh-user@host.domain If ssh-copy-id isn’t available on the respektive system, you can use the […]

Run multiple recoverabele sessions with screen

Sometime you nee to run a script or something like that on a remote host and you can’t be sure, that the remote session will preserve until the script has finished. Another case is mobile working. Sometimes you need the possibility to start a script on one place, send your disconnect the ssh client and open […]

Download or upload a file over SSH

#Copy something from this system to some other system: $> scp /path/to/local/file username@hostname:/path/to/remote/file   #Copy something from some system to some other system: $> scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file   #Copy something from another system to this system: $> scp username@hostname:/path/to/remote/file /path/to/local/file You can add a port with the -P param You can do it recursive with […]

Create a SSH key with 1024 Bit encryption

To generate a 1024 Bit encrypted SSH key you can use the following command: $> ssh-keygen -b 1024 -t rsa Normally the key is saved in ~/.ssh/id_rsa together with the corresponding public key (~/.ssh/id_rsa.pub). Attention: Make sure you can remember the paraphrase later on if you entered one.