linux:ssh
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| linux:ssh [2015/12/24 12:38] – [Received disconnect from ... Too many authentication failures for ...] move | linux:ssh [2019/09/16 19:57] (aktuell) – [lokal] move | ||
|---|---|---|---|
| Zeile 8: | Zeile 8: | ||
| > ssh USER@DOMAIN | > ssh USER@DOMAIN | ||
| + | |||
| + | ===== Erzwinge Passwort-Authentifikation ===== | ||
| + | < | ||
| + | ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no me@host | ||
| + | </ | ||
| + | |||
| + | ===== Removes all keys belonging to hostname from a known_hosts file. ===== | ||
| + | |||
| + | This option is useful to delete hashed hosts. | ||
| + | |||
| + | < | ||
| + | ssh-keygen -f "/ | ||
| + | </ | ||
| + | |||
| + | ===== Keys für ein besteimmte IP entfernen ===== | ||
| + | < | ||
| + | Warning: the ECDSA host key for ' | ||
| + | Offending key for IP in / | ||
| + | Matching host key in / | ||
| + | Are you sure you want to continue connecting (yes/no)? | ||
| + | </ | ||
| + | |||
| + | Lösung: | ||
| + | < | ||
| + | ssh-keygen -R 116.203.XX.XXX | ||
| + | </ | ||
| ===== Tunnel (Remote Port-Forwarding) ===== | ===== Tunnel (Remote Port-Forwarding) ===== | ||
| - | ==== alesana | + | ==== Beispiel |
| - | > ssh -nNT -R \*: | + | > ssh -nNT -R \*: |
| ===== SSH ohne Passwort ===== | ===== SSH ohne Passwort ===== | ||
| Zeile 25: | Zeile 51: | ||
| **2. Übertragen auf remote-Server: | **2. Übertragen auf remote-Server: | ||
| - | > ssh-copy-id -i .ssh/ | + | > ssh-copy-id -i .ssh/ |
| ==== remote ==== | ==== remote ==== | ||
| Zeile 39: | Zeile 65: | ||
| ==== lokal ==== | ==== lokal ==== | ||
| - | > ssh -p 64000 singlespeedfahrer@fahrrad-wiki.org | + | > ssh -p 64000 me@example.com |
| ===== Fehlermeldungen ===== | ===== Fehlermeldungen ===== | ||
| Zeile 47: | Zeile 73: | ||
| > Received disconnect from EXTERNAL_HOST: | > Received disconnect from EXTERNAL_HOST: | ||
| > Disconnected from EXTERNAL_HOST | > Disconnected from EXTERNAL_HOST | ||
| + | |||
| + | Das wird in der Regel dadurch verursacht, dass dem Server mehrere Keys angeboten werden. Der Server akzeptiert keine Schlüssel mehr, nachdem ihm zuviele Keys angeboten werden. | ||
| + | |||
| + | Überprüfen läßt sich das mit dem -v Flag. | ||
| === Mögliche Lösungen: === | === Mögliche Lösungen: === | ||
| Zeile 55: | Zeile 85: | ||
| **mit Pubkey:** | **mit Pubkey:** | ||
| - | This is usually caused by inadvertently offering multiple ssh keys to the server. The server will reject any key after too many keys have been offered. | + | Um das zu verhindern, kann man den Key explizit |
| - | + | ||
| - | You can see this for yourself by adding the -v flag to your ssh command to get verbose output. You will see that a bunch of keys are offered, until the server rejects the connection saying: "Too many authentication failures for [user]" | + | |
| - | + | ||
| - | To prevent irrelevant keys from being offered, you have to explicitly specify this in every host entry in the ~/ | + | |
| + | Beispiel 1 | ||
| > Host www.somehost.com | > Host www.somehost.com | ||
| > | > | ||
| Zeile 66: | Zeile 93: | ||
| > Port 22 | > Port 22 | ||
| - | If you use the ssh-agent, | + | Beispiel 2 |
| + | > Host somehost | ||
| + | > | ||
| + | > | ||
| + | > | ||
| + | > Port 22 | ||
| + | Fall ssh-agent | ||
| - | If you are not using any ssh hosts configuration, | + | Ohne die ssh-Host-Konfiguration geht das mit: |
| > ssh -i some_id_rsa -o ' | > ssh -i some_id_rsa -o ' | ||
| - | Note: the ' | + | oder |
| - | + | ||
| - | or | + | |
| > ssh -i some_id_rsa -o IdentitiesOnly=yes them@there:/ | > ssh -i some_id_rsa -o IdentitiesOnly=yes them@there:/ | ||
| + | |||
| + | //Von https:// | ||
| + | |||
| + | ==== Fehler: sign_and_send_pubkey: | ||
| + | < | ||
| + | ssh me@host | ||
| + | |||
| + | sign_and_send_pubkey: | ||
| + | me@host: Permission denied (publickey). | ||
| + | </ | ||
| + | |||
| + | Lösung: | ||
| + | |||
| + | Problem liegt an gnome-keyring. | ||
| + | < | ||
| + | ssh-add ~/ | ||
| + | </ | ||
| ===== Siehe auch ===== | ===== Siehe auch ===== | ||
| * [[linux: | * [[linux: | ||
| + | * [[sftp als root auf Server ohne root-ssh-Login]] | ||
| + | * [[sshfs]] | ||
linux/ssh.1450960695.txt.gz · Zuletzt geändert: (Externe Bearbeitung)
