Ssh

Aus Vosp.info
Wechseln zu:Navigation, Suche

Allgemein

Debug Ausgaben

ssh -v ....


Authentifizierung über Public-Keys

Keypaar erstellen

ssh-keygen -t rsa

Öffentlichen Schlüssel auf den Server kopieren

ssh-copy-id -i ~/.ssh/id_rsa.pub user@server
ssh-copy-id '-p 345 -i ~/.ssh/id_rsa.pub user@server'      // falls port anders

auf den Server einloggen

ssh user@server

Veralteten SSH-Schlüssel aus der known_hosts entfernen Fehlerausgabe:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
aa:bb:cc:dd:ee:ff:gg:bd:f7:92:79:1c:cc:3b:af:11.
Please contact your system administrator.
Add correct host key in /home/sn/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/sn/.ssh/known_hosts:7
RSA host key for [78.46.110.16]:262 has changed and you have requested strict checking.
Host key verification failed.

Lösung

sed -i '7d' ~/.ssh/known_hosts