lima-city: Webhosting, Domains und Cloud
0 Pluspunkte 0 Minuspunkte

Ich habe eine Instanz auf Docker Playground erstellt und den SSH Link in meinem Terminal eingegeben. Beim verbinden kommt die Fehlermeldung

Permission denied (publickey)

Woher bekomme ich den Public Key? Der steht nirgends im Webinterface. Hier ist die Ausgabe mit dem Parameter -v.

C:\Users\mathias>ssh ip172-18-0-20-d11b9ns69qi000dh3qc0@direct.labs.play-with-docker.com -v
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Connecting to direct.labs.play-with-docker.com [40.76.55.146] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\mathias/.ssh/id_rsa type 0
debug1: identity file C:\\Users\\mathias/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_ed25519_sk type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_xmss-cert type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\mathias/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5
debug1: Remote protocol version 2.0, remote software version Go
debug1: compat_banner: no match: Go
debug1: Authenticating to direct.labs.play-with-docker.com:22 as 'ip172-18-0-20-d11b9ns69qi000dh3qc0'
debug1: load_hostkeys: fopen C:\\Users\\mathias/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-rsa SHA256:vCbhEjmYQhtNzuuuh7TmGAPfe9T+JdGnGaVquQJUphY
debug1: load_hostkeys: fopen C:\\Users\\mathias/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'direct.labs.play-with-docker.com' is known and matches the RSA host key.
debug1: Found key in C:\\Users\\mathias/.ssh/known_hosts:4
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: C:\\Users\\mathias/.ssh/id_rsa RSA SHA256:Ev8AWDyDh+mvDAMfhpcAy9VvV+dquDJHdPjn6Cw5Qgo
debug1: Will attempt key: C:\\Users\\mathias/.ssh/id_ecdsa
debug1: Will attempt key: C:\\Users\\mathias/.ssh/id_ecdsa_sk
debug1: Will attempt key: C:\\Users\\mathias/.ssh/id_ed25519
debug1: Will attempt key: C:\\Users\\mathias/.ssh/id_ed25519_sk
debug1: Will attempt key: C:\\Users\\mathias/.ssh/id_xmss
debug1: Will attempt key: C:\\Users\\mathias/.ssh/id_dsa
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: C:\\Users\\mathias/.ssh/id_rsa RSA SHA256:Ev8AWDyDh+mvDAMfhpcAy9VvV+dquDJHdPjn6Cw5Qgo
debug1: send_pubkey_test: no mutual signature algorithm
debug1: Trying private key: C:\\Users\\mathias/.ssh/id_ecdsa
debug1: Trying private key: C:\\Users\\mathias/.ssh/id_ecdsa_sk
debug1: Trying private key: C:\\Users\\mathias/.ssh/id_ed25519
debug1: Trying private key: C:\\Users\\mathias/.ssh/id_ed25519_sk
debug1: Trying private key: C:\\Users\\mathias/.ssh/id_xmss
debug1: Trying private key: C:\\Users\\mathias/.ssh/id_dsa
debug1: No more authentication methods to try.
ip172-18-0-20-d11b9ns69qi000dh3qc0@direct.labs.play-with-docker.com: Permission denied (publickey).
von  
Gib den Befehl mit dem zusätzlichen Parameter -v ein, z.B

ssh xxx@yyy -v

und poste die Ausgabe bitte zu deiner Frage dazu.

1 Antwort

0 Pluspunkte 0 Minuspunkte

Die Zeile

debug1: send_pubkey_test: no mutual signature algorithm

besagt das ein Mismatch im Public Key Algorythmus vorliegt. Du kannst im Container diesen Befehl eingeben

cat ~/.ssh/id_rsa.pub

Am Anfang der Ausgabe steht

ssh-xxxx AAA......

Der rot markierte Teil besagt den verwendeten Algorythmus. Wahrscheinlich ist es ein ED25519 Key. Erstelle einen entsprechenden Key mit

ssh-keygen -t ed25519 -P ""

und versuche es damit erneut.

von (684 Punkte)