Cannot connect to instance in Docker Playground via SSH - docker
I'm trying to connect to a Docker Playground instance from a SSH session initiated in CMD from my Windows 10 computer with the following command:
ssh -v ip172-18-0-18-cbepm33cukq00090gvu0#direct.labs.play-with-docker.com
Here is the SSH output:
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Connecting to direct.labs.play-with-docker.com [40.76.55.146] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\Marciano/.ssh/id_rsa type 0
debug1: identity file C:\\Users\\Marciano/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\Marciano/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\Marciano/.ssh/id_dsa-cert type -1
debug1: identity file C:\\Users\\Marciano/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\Marciano/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\Marciano/.ssh/id_ed25519 type 3
debug1: identity file C:\\Users\\Marciano/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\Marciano/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\Marciano/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 2.0, remote software version Go
debug1: no match: Go
debug1: Authenticating to direct.labs.play-with-docker.com:22 as 'ip172-18-0-18-cbepm33cukq00090gvu0'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256#libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256-etm#openssh.com compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256-etm#openssh.com compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:UyqFRi42lglohSOPKn6Hh9M83Y5Ic9IQn1PTHYqOjEA
debug1: Host 'direct.labs.play-with-docker.com' is known and matches the RSA host key.
debug1: Found key in C:\\Users\\Marciano/.ssh/known_hosts:19
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_ed25519 ED25519 SHA256:/p+cVcQBROp4X3eq1wi10tfgBSVUmKDaV2/hpxNTzM0 agent
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_rsa RSA SHA256:BZFw2ybMWiH6PSOug+zBT90LhgwoxDMR0Ci7wAeJs/I
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_dsa
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_ecdsa
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_xmss
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: C:\\Users\\Marciano/.ssh/id_ed25519 ED25519 SHA256:/p+cVcQBROp4X3eq1wi10tfgBSVUmKDaV2/hpxNTzM0 agent
debug1: Server accepts key: C:\\Users\\Marciano/.ssh/id_ed25519 ED25519 SHA256:/p+cVcQBROp4X3eq1wi10tfgBSVUmKDaV2/hpxNTzM0 agent
debug1: Authentication succeeded (publickey).
Authenticated to direct.labs.play-with-docker.com ([40.76.55.146]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing
Connecting to 52.188.151.184:8022
debug1: channel 0: free: client-session, nchannels 1
Connection to direct.labs.play-with-docker.com closed.
Transferred: sent 2212, received 1436 bytes, in 1.1 seconds
Bytes per second: sent 1985.7, received 1289.1
debug1: Exit status -1
The logs show that after successful authentication the connection is immediately closed and the process exits with -1 status.
I also tried connecting with a PUTTY client and a custom .pkk file created by me with puttygen.exe as suggested in connect to a play-with-docker instance via putty however the SSH connection failed with Server refused to allocate pty status.
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2022.07.24 17:13:47 =~=~=~=~=~=~=~=~=~=~=~=
Using username "ip172-18-0-18-cbepm33cukq00090gvu0".
Authenticating with public key "rsa-key-20220724"
Connecting to 52.188.151.184:8022
Server refused to allocate pty
Below is the more detailed output generated with -vvv ssh -vvv ip172-18-0-18-cbepm33cukq00090gvu0#direct.labs.play-with-docker.com
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug3: Failed to open file:C:/Users/Marciano/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolving "direct.labs.play-with-docker.com" port 22
debug2: ssh_connect_direct
debug1: Connecting to direct.labs.play-with-docker.com [40.76.55.146] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\Marciano/.ssh/id_rsa type 0
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_rsa-cert.pub error:2
debug1: identity file C:\\Users\\Marciano/.ssh/id_rsa-cert type -1
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_dsa error:2
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_dsa.pub error:2
debug1: identity file C:\\Users\\Marciano/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_dsa-cert error:2
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_dsa-cert.pub error:2
debug1: identity file C:\\Users\\Marciano/.ssh/id_dsa-cert type -1
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_ecdsa error:2
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_ecdsa.pub error:2
debug1: identity file C:\\Users\\Marciano/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_ecdsa-cert error:2
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_ecdsa-cert.pub error:2
debug1: identity file C:\\Users\\Marciano/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\Marciano/.ssh/id_ed25519 type 3
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_ed25519-cert.pub error:2
debug1: identity file C:\\Users\\Marciano/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_xmss.pub error:2
debug1: identity file C:\\Users\\Marciano/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/Marciano/.ssh/id_xmss-cert.pub error:2
debug1: identity file C:\\Users\\Marciano/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 2.0, remote software version Go
debug1: no match: Go
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to direct.labs.play-with-docker.com:22 as 'ip172-18-0-18-cbepm33cukq00090gvu0'
debug3: hostkeys_foreach: reading file "C:\\Users\\Marciano/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file C:\\Users\\Marciano/.ssh/known_hosts:19
debug3: load_hostkeys: loaded 1 keys from direct.labs.play-with-docker.com
debug3: Failed to open file:C:/Users/Marciano/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: rsa-sha2-512-cert-v01#openssh.com,rsa-sha2-256-cert-v01#openssh.com,ssh-rsa-cert-v01#openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: rsa-sha2-512-cert-v01#openssh.com,rsa-sha2-256-cert-v01#openssh.com,ssh-rsa-cert-v01#openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256-cert-v01#openssh.com,ecdsa-sha2-nistp384-cert-v01#openssh.com,ecdsa-sha2-nistp521-cert-v01#openssh.com,ssh-ed25519-cert-v01#openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305#openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm#openssh.com,aes256-gcm#openssh.com
debug2: ciphers stoc: chacha20-poly1305#openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm#openssh.com,aes256-gcm#openssh.com
debug2: MACs ctos: umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib#openssh.com,zlib
debug2: compression stoc: none,zlib#openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: host key algorithms: ssh-rsa
debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm#openssh.com,arcfour256,arcfour128
debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm#openssh.com,arcfour256,arcfour128
debug2: MACs ctos: hmac-sha2-256-etm#openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96
debug2: MACs stoc: hmac-sha2-256-etm#openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256#libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256-etm#openssh.com compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256-etm#openssh.com compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ssh-rsa SHA256:UyqFRi42lglohSOPKn6Hh9M83Y5Ic9IQn1PTHYqOjEA
debug3: hostkeys_foreach: reading file "C:\\Users\\Marciano/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file C:\\Users\\Marciano/.ssh/known_hosts:19
debug3: load_hostkeys: loaded 1 keys from direct.labs.play-with-docker.com
debug3: Failed to open file:C:/Users/Marciano/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug3: hostkeys_foreach: reading file "C:\\Users\\Marciano/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file C:\\Users\\Marciano/.ssh/known_hosts:19
debug3: load_hostkeys: loaded 1 keys from 40.76.55.146
debug3: Failed to open file:C:/Users/Marciano/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug1: Host 'direct.labs.play-with-docker.com' is known and matches the RSA host key.
debug1: Found key in C:\\Users\\Marciano/.ssh/known_hosts:19
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_ed25519 ED25519 SHA256:/p+cVcQBROp4X3eq1wi10tfgBSVUmKDaV2/hpxNTzM0 agent
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_rsa RSA SHA256:BZFw2ybMWiH6PSOug+zBT90LhgwoxDMR0Ci7wAeJs/I
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_dsa
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_ecdsa
debug1: Will attempt key: C:\\Users\\Marciano/.ssh/id_xmss
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: C:\\Users\\Marciano/.ssh/id_ed25519 ED25519 SHA256:/p+cVcQBROp4X3eq1wi10tfgBSVUmKDaV2/hpxNTzM0 agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: C:\\Users\\Marciano/.ssh/id_ed25519 ED25519 SHA256:/p+cVcQBROp4X3eq1wi10tfgBSVUmKDaV2/hpxNTzM0 agent
debug3: sign_and_send_pubkey: ED25519 SHA256:/p+cVcQBROp4X3eq1wi10tfgBSVUmKDaV2/hpxNTzM0
debug3: sign_and_send_pubkey: signing using ssh-ed25519
debug3: send packet: type 50
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to direct.labs.play-with-docker.com ([40.76.55.146]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Entering interactive session.
debug1: pledge: network
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console
debug3: This windows OS supports conpty
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing
debug3: Successfully set console output code page from:65001 to 65001
debug3: Successfully set console input code page from:850 to 65001
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 2097152 rmax 32768
debug2: channel 0: rcvd ext data 35
Connecting to 52.188.151.184:8022
debug2: channel 0: written 35 to efd 6
debug3: receive packet: type 97
debug2: channel 0: rcvd close
debug2: channel 0: output open -> drain
debug2: channel 0: chan_shutdown_read (i0 o1 sock -1 wfd 4 efd 6 [write])
debug2: channel 0: input open -> closed
debug3: channel 0: will not send data after close
debug2: channel 0: obuf empty
debug2: channel 0: chan_shutdown_write (i3 o1 sock -1 wfd 5 efd 6 [write])
debug2: channel 0: output drain -> closed
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug3: Successfully set console output code page from 65001 to 65001
debug3: Successfully set console input code page from 65001 to 850
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug3: send packet: type 97
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i3/0 o3/0 e[write]/0 fd -1/-1/6 sock -1 cc -1)
debug3: send packet: type 1
debug3: Successfully set console output code page from 65001 to 65001
debug3: Successfully set console input code page from 65001 to 850
Connection to direct.labs.play-with-docker.com closed.
Transferred: sent 2212, received 1436 bytes, in 1.1 seconds
Bytes per second: sent 1964.8, received 1275.5
debug1: Exit status -1
Thanks in advance for your help.
In my case, I was not able to connect.
The log indicates there is a mismatch in the public key algorithim
debug1: Offering public key: /c/Users/thiru/.ssh/id_rsa RSA SHA256:okCget2rl5sGoR024BKQkKZrv/7lwc/CZ98bDmECvF8
debug1: send_pubkey_test: no mutual signature algorithm
check the PWD (play with docker) instance algorithm, navigate to the Docker playground and check the .ssh algorithm type in my case it was ed25519 not rsa.
To fix this from Git bash terminal, I had to create a new ssh key with ed25519
$ ssh-keygen -t ed25519 -P "" -f ~/.ssh/id_ed25519
Generating public/private ed25519 key pair.
Your identification has been saved in /c/Users/thiru/.ssh/id_ed25519
Your public key has been saved in /c/Users/thiru/.ssh/id_ed25519.pub
Then I was able to connect to the PWD instance
complete Ssh client log
ssh -v ip17212-***********#direct.labs.play-with-docker.com
OpenSSH_8.8p1, OpenSSL 1.1.1l 24 Aug 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to direct.labs.play-with-docker.com [40.*.*.146] port 22.
debug1: Connection established.
...
debug1: Local version string SSH-2.0-OpenSSH_8.8
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-****-*********'
debug1: load_hostkeys: fopen /c/Users/thiru/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/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:vCb*******************
debug1: load_hostkeys: fopen /c/Users/thiru/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/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/thiru/.ssh/known_hosts:8
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: Will attempt key: /c/Users/thiru/.ssh/id_rsa RSA SHA256:okCget2rl5sGoR024BKQkKZrv/7lwc/CZ98bDmECvF8
debug1: Will attempt key: /c/Users/thiru/.ssh/id_dsa
debug1: Will attempt key: /c/Users/thiru/.ssh/id_ecdsa
debug1: Will attempt key: /c/Users/thiru/.ssh/id_ecdsa_sk
debug1: Will attempt key: /c/Users/thiru/.ssh/id_ed25519
debug1: Will attempt key: /c/Users/thiru/.ssh/id_ed25519_sk
debug1: Will attempt key: /c/Users/thiru/.ssh/id_xmss
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /c/Users/thiru/.ssh/id_rsa RSA SHA256:okCget2rl5sGoR024BKQkKZrv/7lwc/CZ98bDmECvF8
debug1: send_pubkey_test: no mutual signature algorithm
debug1: Trying private key: /c/Users/thiru/.ssh/id_dsa
debug1: Trying private key: /c/Users/thiru/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/thiru/.ssh/id_ecdsa_sk
debug1: Trying private key: /c/Users/thiru/.ssh/id_ed25519
debug1: Trying private key: /c/Users/thiru/.ssh/id_ed25519_sk
debug1: Trying private key: /c/Users/thiru/.ssh/id_xmss
debug1: No more authentication methods to try.
ip172-1*****2-cd5d********g#direct.labs.play-with-docker.com: Permission denied (publickey).
Related
Git clone is asking for credential even after configuring ssh key
I have my gitlab and jenkins server running on the same node.Trying to integrate jenkins with gitlab. Env Details: Centos8 running on VMware jenkins server running on port 8080 Gitlab server running on 8123 Issue : Gitclone is asking for credentials every time i try to clone. Expected Result: Gitclone should not ask for credentials if I have already configured ssh key. SSH key is configured in gitlab portal. Generated a new pair of ssh key. Public key is added to SSH Keys section in gitlab portal Key pair [root#gitlab .ssh]# ls id_rsa id_rsa.pub known_hosts [root#gitlab .ssh]# ssh verification working fine [root#gitlab ~]# ssh -T git#gitlab.abhi.com Welcome to GitLab, #abhijeet! [root#gitlab ~]# verbose output of gitclone [root#gitlab ssh]# [root#gitlab ssh]# sudo GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone gitlab.abhi.com:8123/abhijeet/development.git 10:32:17.133437 git.c:447 trace: built-in: git clone gitlab.abhi.com:8123/abhijeet/development.git Cloning into 'development'... 10:32:17.138289 run-command.c:667 trace: run_command: unset GIT_DIR; GIT_PROTOCOL=version=2 'ssh -vvv' -o SendEnv=GIT_PROTOCOL gitlab.abhi.com 'git-upload-pack '\''8123/abhijeet/development.git'\''' OpenSSH_8.0p1, OpenSSL 1.1.1k FIPS 25 Mar 2021 debug1: Reading configuration data /etc/ssh/ssh_config debug3: /etc/ssh/ssh_config line 52: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug2: checking match for 'final all' host gitlab.abhi.com originally gitlab.abhi.com debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: not matched 'final' debug2: match not found debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only) debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-] debug3: kex names ok: [curve25519-sha256,curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1] debug1: configuration requests final Match pass debug1: re-parsing configuration debug1: Reading configuration data /etc/ssh/ssh_config debug3: /etc/ssh/ssh_config line 52: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0 debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug2: checking match for 'final all' host gitlab.abhi.com originally gitlab.abhi.com debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: matched 'final' debug2: match found debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-] debug3: kex names ok: [curve25519-sha256,curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1] debug2: resolving "gitlab.abhi.com" port 22 debug2: ssh_connect_direct debug1: Connecting to gitlab.abhi.com [192.168.33.128] port 22. debug1: Connection established. debug1: identity file /root/.ssh/id_rsa type 0 debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1: identity file /root/.ssh/id_ecdsa type -1 debug1: identity file /root/.ssh/id_ecdsa-cert type -1 debug1: identity file /root/.ssh/id_ed25519 type -1 debug1: identity file /root/.ssh/id_ed25519-cert type -1 debug1: identity file /root/.ssh/id_xmss type -1 debug1: identity file /root/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.0 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.0 debug1: match: OpenSSH_8.0 pat OpenSSH* compat 0x04000000 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to gitlab.abhi.com:22 as 'root' debug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts" debug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys from gitlab.abhi.com debug3: order_hostkeyalgs: have matching best-preference key type ecdsa-sha2-nistp256-cert-v01#openssh.com, using HostkeyAlgorithms verbatim debug3: send packet: type 20 debug1: SSH2_MSG_KEXINIT sent debug3: receive packet: type 20 debug1: SSH2_MSG_KEXINIT received debug2: local client KEXINIT proposal debug2: KEX algorithms: curve25519-sha256,curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ext-info-c debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01#openssh.com,ecdsa-sha2-nistp384-cert-v01#openssh.com,ecdsa-sha2-nistp521-cert-v01#openssh.com,ssh-ed25519-cert-v01#openssh.com,rsa-sha2-512-cert-v01#openssh.com,rsa-sha2-256-cert-v01#openssh.com,ssh-rsa-cert-v01#openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa debug2: ciphers ctos: aes256-gcm#openssh.com,chacha20-poly1305#openssh.com,aes256-ctr,aes256-cbc,aes128-gcm#openssh.com,aes128-ctr,aes128-cbc debug2: ciphers stoc: aes256-gcm#openssh.com,chacha20-poly1305#openssh.com,aes256-ctr,aes256-cbc,aes128-gcm#openssh.com,aes128-ctr,aes128-cbc debug2: MACs ctos: hmac-sha2-256-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-sha2-256,hmac-sha1,umac-128#openssh.com,hmac-sha2-512 debug2: MACs stoc: hmac-sha2-256-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-sha2-256,hmac-sha1,umac-128#openssh.com,hmac-sha2-512 debug2: compression ctos: none,zlib#openssh.com,zlib debug2: compression stoc: none,zlib#openssh.com,zlib debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug2: peer server KEXINIT proposal debug2: KEX algorithms: curve25519-sha256,curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 debug2: ciphers ctos: aes256-gcm#openssh.com,chacha20-poly1305#openssh.com,aes256-ctr,aes256-cbc,aes128-gcm#openssh.com,aes128-ctr,aes128-cbc debug2: ciphers stoc: aes256-gcm#openssh.com,chacha20-poly1305#openssh.com,aes256-ctr,aes256-cbc,aes128-gcm#openssh.com,aes128-ctr,aes128-cbc debug2: MACs ctos: hmac-sha2-256-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-sha2-256,hmac-sha1,umac-128#openssh.com,hmac-sha2-512 debug2: MACs stoc: hmac-sha2-256-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-sha2-256,hmac-sha1,umac-128#openssh.com,hmac-sha2-512 debug2: compression ctos: none,zlib#openssh.com debug2: compression stoc: none,zlib#openssh.com debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: aes256-gcm#openssh.com MAC: <implicit> compression: none debug1: kex: client->server cipher: aes256-gcm#openssh.com MAC: <implicit> compression: none debug1: kex: curve25519-sha256 need=32 dh_need=32 debug1: kex: curve25519-sha256 need=32 dh_need=32 debug3: send packet: type 30 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug3: receive packet: type 31 debug1: Server host key: ecdsa-sha2-nistp256 SHA256:4H49l5F6R+kMlJ4xmCm4GC49tTyBPkDbxEMU4W4mCXc debug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts" debug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys from gitlab.abhi.com debug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts" debug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys from 192.168.33.128 debug1: Host 'gitlab.abhi.com' is known and matches the ECDSA host key. debug1: Found key in /root/.ssh/known_hosts:1 debug3: send packet: type 21 debug2: set_newkeys: mode 1 debug1: rekey out after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug3: receive packet: type 21 debug1: SSH2_MSG_NEWKEYS received debug2: set_newkeys: mode 0 debug1: rekey in after 4294967296 blocks debug1: Will attempt key: /root/.ssh/id_rsa RSA SHA256:ZCXStX337wDA5IyySXzf+YSKrrqgsc1kADF5zGXgJZE debug1: Will attempt key: /root/.ssh/id_dsa debug1: Will attempt key: /root/.ssh/id_ecdsa debug1: Will attempt key: /root/.ssh/id_ed25519 debug1: Will attempt key: /root/.ssh/id_xmss debug2: pubkey_prepare: done debug3: send packet: type 5 debug3: receive packet: type 7 debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521> debug3: receive packet: type 6 debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug3: send packet: type 50 debug3: receive packet: type 51 debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password debug3: authmethod_lookup gssapi-with-mic debug3: remaining preferred: publickey,keyboard-interactive,password debug3: authmethod_is_enabled gssapi-with-mic debug1: Next authentication method: gssapi-with-mic debug1: Unspecified GSS failure. Minor code may provide more information No Kerberos credentials available (default cache: KCM:) debug1: Unspecified GSS failure. Minor code may provide more information No Kerberos credentials available (default cache: KCM:) debug2: we did not send a packet, disable method debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering public key: /root/.ssh/id_rsa RSA SHA256:ZCXStX337wDA5IyySXzf+YSKrrqgsc1kADF5zGXgJZE debug3: send packet: type 50 debug2: we sent a publickey packet, wait for reply debug3: receive packet: type 51 debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Trying private key: /root/.ssh/id_dsa debug3: no such identity: /root/.ssh/id_dsa: No such file or directory debug1: Trying private key: /root/.ssh/id_ecdsa debug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory debug1: Trying private key: /root/.ssh/id_ed25519 debug3: no such identity: /root/.ssh/id_ed25519: No such file or directory debug1: Trying private key: /root/.ssh/id_xmss debug3: no such identity: /root/.ssh/id_xmss: No such file or directory debug2: we did not send a packet, disable method debug3: authmethod_lookup p`your text`assword debug3: remaining preferred: ,password debug3: authmethod_is_enabled password debug1: Next authentication method: password root#gitlab.abhi.com's password: Resolution Clone is successful after switching it to git user. Even no need to configure ssh key if configuring through http. [git#gitlab gitlab-ci]$ GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone http://gitlab.abhi.com:8123/abhijeet/development.git 01:22:41.298220 git.c:447 trace: built-in: git clone http://gitlab.abhi.com:8123/abhijeet/development.git Cloning into 'development'... 01:22:41.303574 run-command.c:667 trace: run_command: git remote-http origin http://gitlab.abhi.com:8123/abhijeet/development.git 01:22:41.311040 git.c:733 trace: exec: git-remote-http origin http://gitlab.abhi.com:8123/abhijeet/development.git 01:22:41.311309 run-command.c:667 trace: run_command: git-remote-http origin http://gitlab.abhi.com:8123/abhijeet/development.git 01:22:41.890366 run-command.c:667 trace: run_command: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 49081 on gitlab.abhi.com' --check-self-contained-and-connected remote: Enumerating objects: 3, done. remote: Counting objects: 100% (3/3), done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 01:22:41.894891 git.c:447 trace: built-in: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 49081 on gitlab.abhi.com' --check-self-contained-and-connected Receiving objects: 100% (3/3), done. 01:22:41.929828 run-command.c:667 trace: run_command: git rev-list --objects --stdin --not --all --quiet --alternate-refs '--progress=Checking connectivity' 01:22:41.950559 git.c:447 trace: built-in: git rev-list --objects --stdin --not --all --quiet --alternate-refs '--progress=Checking connectivity' [git#gitlab gitlab-ci]$ ls -lrth total 0 drwx------. 2 git git 6 Dec 8 11:12 builds drwxrwxr-x 3 git git 35 Dec 14 01:22 development [git#gitlab gitlab-ci]$
First, a clone of http://... means SSH keys are not used. At all. Second, a git clone gitlab.abhi.com:8123/abhijeet/development.git should specify the user: git clone git#gitlab.abhi.com:8123/abhijeet/development.git ^^^^ Since, at the end of the SSH debug log, it asks: root#gitlab.abhi.com's password, that means it tried to contact the remote server with the remote account root, instead of the remote service account git.
How to use tensorboard within a docker container across a ssh tunnel?
I'm running a deep learning network on a remote GPU cluster and I'd like to use tensorboard to visualize my training and performance. The problem is I'm really confused on how to expose the port tensorboard uses to my local computer. Due to security and account permission reasons, I have to connect to this server through another server. I also have the complication of training my network within a docker container. I'm not super familiar with advanced ssh stuff or just networking stuff in general so I'm wondering how to accomplish this. Here's a roadmap of how I connect: local computer -> intermediate network -> GPU cluster -> docker container I normally connect to the GPU cluster using ssh -X -J 2fly#intermediate.server 2try#XX.XXX.XX.XXX. My docker command looks like NV_GPU=all nvidia-docker run --runtime=nvidia --rm -p 5001:6006 -v path/to/data:/UserData/data -v path/to/code:/UserData/code -v path/to/logs:/UserData/logs -it container_name I've tried adding the -L option to my ssh command but I get an error saying stty: standard input: Inappropriate ioctl for device ssh_exchange_identification: Connection closed EDIT: Here's the output of ssh -f -v -N -J 2fly#intermediate.server 2try#XX.XXX.XX.XXX –L 5001:XX.XXX.XX.XXX:5001 (with identifying info removed) debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 13: Deprecated option "useroaming" debug1: Setting implicit ProxyCommand from ProxyJump: ssh -l 2fly -v -W '[%h]:%p' intermediate.server debug1: Executing proxy command: exec ssh -l 2fly -v -W '[XX.XXX.XX.XXX]:22' intermediate.server debug1: permanently_drop_suid: 16000 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_rsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.5 stty: standard input: Inappropriate ioctl for device OpenSSH_7.5p1, OpenSSL 1.0.2o 27 Mar 2018 debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 13: Deprecated option "useroaming" debug1: Connecting to intermediate.server [address] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_rsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/mobaxterm/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.5 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4 debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000 debug1: Authenticating to intermediate.server:22 as '2fly' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-rsa debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: zlib#openssh.com debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: zlib#openssh.com debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ssh-rsa SHA256:key debug1: Host 'intermediate.server' is known and matches the RSA host key. debug1: Found key in /home/mobaxterm/.ssh/known_hosts:4 debug1: rekey after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 4294967296 blocks debug1: pubkey_prepare: ssh_fetch_identitylist: agent refused operation debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: publickey debug1: Trying private key: /home/mobaxterm/.ssh/id_rsa debug1: Trying private key: /home/mobaxterm/.ssh/id_dsa debug1: Trying private key: /home/mobaxterm/.ssh/id_ecdsa debug1: Trying private key: /home/mobaxterm/.ssh/id_ed25519 debug1: Next authentication method: password debug1: Enabling compression at level 6. debug1: Authentication succeeded (password). Authenticated to intermediate.server ([address]:22). debug1: channel_connect_stdio_fwd XX.XXX.XX.XXX:22 debug1: channel 0: new [stdio-forward] debug1: getpeername failed: Bad file descriptor debug1: Requesting no-more-sessions#openssh.com debug1: Entering interactive session. debug1: pledge: exec debug1: client_input_global_request: rtype hostkeys-00#openssh.com want_reply 0 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.4 debug1: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.4 pat OpenSSH* compat 0x04000000 debug1: Authenticating to XX.XXX.XX.XXX:22 as '2try' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-rsa debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: zlib#openssh.com debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: zlib#openssh.com debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ssh-rsa SHA256:key debug1: Host 'XX.XXX.XX.XXX' is known and matches the RSA host key. debug1: Found key in /home/mobaxterm/.ssh/known_hosts:5 debug1: rekey after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 4294967296 blocks debug1: pubkey_prepare: ssh_fetch_identitylist: agent refused operation debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519#openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256#openssh.com> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Trying private key: /home/mobaxterm/.ssh/id_rsa debug1: Trying private key: /home/mobaxterm/.ssh/id_dsa debug1: Trying private key: /home/mobaxterm/.ssh/id_ecdsa debug1: Trying private key: /home/mobaxterm/.ssh/id_ed25519 debug1: Next authentication method: password debug1: Enabling compression at level 6. debug1: Authentication succeeded (password). Authenticated to XX.XXX.XX.XXX (via proxy). debug1: Local connections to LOCALHOST:5001 forwarded to remote address XX.XXX.XX.XXX:5001 debug1: Local forwarding listening on ::1 port 5001. debug1: channel 0: new [port listener] debug1: Local forwarding listening on 127.0.0.1 port 5001. debug1: channel 1: new [port listener] debug1: Requesting no-more-sessions#openssh.com debug1: forking to background debug1: Entering interactive session. debug1: pledge: exec debug1: client_input_global_request: rtype hostkeys-00#openssh.com want_reply 0
I try to connect by ssh from Home Assistant (docker) in Debian and there is no way
Good companions. I have a PC with Openmediavault and Home Assistant on a docker container. I want to ssh the home assistant to the openmediavault system (debian). I try to do it from the SSH & Web Terminal addons, but there is no humane way to do it. I try to do it like this: cd /config mkdir .ssh ssh-keygen -b 4096 -t rsa He asks me for the destination route and I give it to him: /config/.ssh/id_rsa This copies the private key to the openmediavault server (Debian) ssh-copy-id -i /config/.ssh/id_rsa peter#192.168.1.37 With this I try to connect to the server to avoid being asked for the password. But he keeps asking me. With the -v it debugs and shows errors supposedly that it does not find the private key. ssh -v -i /root/.ssh/id_rsa peter#192.168.1.37 OpenSSH_8.8p1, OpenSSL 1.1.1l 24 Aug 2021 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug1: Connecting to 192.168.1.37 [192.168.1.37] port 22. debug1: Connection established. debug1: identity file /root/.ssh/id_rsa type 0 debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1: identity file /root/.ssh/id_ecdsa type -1 debug1: identity file /root/.ssh/id_ecdsa-cert type -1 debug1: identity file /root/.ssh/id_ecdsa_sk type -1 debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /root/.ssh/id_ed25519 type -1 debug1: identity file /root/.ssh/id_ed25519-cert type -1 debug1: identity file /root/.ssh/id_ed25519_sk type -1 debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /root/.ssh/id_xmss type -1 debug1: identity file /root/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.8 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2 debug1: compat_banner: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000 debug1: Authenticating to 192.168.1.37:22 as 'peter' debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/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: ssh-ed25519 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-ed25519 SHA256:JEfCsgteJLvd11uZUNVx/DKemQZ1tg5xpRKTF0RggUqBzsY debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host '192.168.1.37' is known and matches the ED25519 host key. debug1: Found key in /root/.ssh/known_hosts:1 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: Will attempt key: /root/.ssh/id_rsa RSA SHA256:lxlph5P16mJj6H1WhyGku6zaDlQo3ATHWgyphk374pTp8 debug1: Will attempt key: /root/.ssh/id_dsa debug1: Will attempt key: /root/.ssh/id_ecdsa debug1: Will attempt key: /root/.ssh/id_ecdsa_sk debug1: Will attempt key: /root/.ssh/id_ed25519 debug1: Will attempt key: /root/.ssh/id_ed25519_sk debug1: Will attempt key: /root/.ssh/id_xmss debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: /root/.ssh/id_rsa RSA SHA256:lxlph5P16mJj6H1WhyGku6zaDlQo3ATHWgyphk374pTp8 debug1: Authentications that can continue: publickey,password debug1: Trying private key: /root/.ssh/id_dsa debug1: Trying private key: /root/.ssh/id_ecdsa debug1: Trying private key: /root/.ssh/id_ecdsa_sk debug1: Trying private key: /root/.ssh/id_ed25519 debug1: Trying private key: /root/.ssh/id_ed25519_sk debug1: Trying private key: /root/.ssh/id_xmss debug1: Next authentication method: password peter#192.168.1.37's password:
how to sshfs/sftp on boot2docker or docker-toolbox
I work with MacOSX (El Capitan) on a Core2duo processor. I work with Docker, but I can't use native docker and I work with Boot2Docker over VirtualBox. As filesystem is not share between host and container, I can't work with watch program to auto reload on modification file. I thought to a solution in editing file over SSHFS. But I can't find out how to do that. ssh docker#192.168.99.100 Work perfectly with password or with id_rsa key scp -vvv docker#192.168.99.100:/var/log/*.log ./log Work also correctly But I can't succeed with sshsf. Is anybody could help me ? sshfs -odebug,sshfs_debug,loglevel=debug docker#192.168.99.100:/var/log ./log SSHFS version 2.5 FUSE library version: 2.9.7 nullpath_ok: 0 nopath: 0 utime_omit_ok: 0 executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-ologlevel=debug> <-2> <docker#192.168.99.100> <-s> <sftp> debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: /etc/ssh/ssh_config line 56: Applying options for * debug1: Connecting to 192.168.99.100 [192.168.99.100] port 22. debug1: Connection established. debug1: identity file /Users/metzger9/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /Users/metzger9/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/metzger9/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/metzger9/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/metzger9/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/metzger9/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/metzger9/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/metzger9/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.9 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4 debug1: match: OpenSSH_6.4 pat OpenSSH* compat 0x04000000 debug1: Authenticating to 192.168.99.100:22 as 'docker' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr umac-64-etm#openssh.com none debug1: kex: client->server aes128-ctr umac-64-etm#openssh.com none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:sY/F5Id4SuRpbOsKcQIGeanTvbibZtsPVV2qGBlSi8A debug1: Host '192.168.99.100' is known and matches the ECDSA host key. debug1: Found key in /Users/metzger9/.ssh/known_hosts:7 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/metzger9/.ssh/id_rsa debug1: Server accepts key: pkalg ssh-rsa blen 279 debug1: Authentication succeeded (publickey). Authenticated to 192.168.99.100 ([192.168.99.100]:22). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessions#openssh.com debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LANG = fr_FR.UTF-8 debug1: Sending env LC_CTYPE = en_US.UTF-8 debug1: Sending subsystem: sftp debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow#openssh.com reply 0 debug1: channel 0: free: client-session, nchannels 1 debug1: fd 0 clearing O_NONBLOCK Transferred: sent 3472, received 2388 bytes, in 0.0 seconds Bytes per second: sent 122807.4, received 84465.5 debug1: Exit status 127 remote host has disconnected SOME MORE INFORMATION It seems that the problem come from sftp program. So trying the command sftp -vvv docker#192.168.99.100 leads to the same error. Some more googling give me an answer for sftp : sftp -s /usr/libexec/sftp-server docker#192.168.99.100 which work as expected. Now the question is "How configure the sftp server in the docker engine to be able to use it with sshfs"
Ansible won't let me connect through SSH
I'm trying to connect from one server to another. In fact I'm trying to connect to my host OS (CoreOS) from within a docker container. I have set up a RSA key and it works like a charm when using standard command line to connect to the remote host. It works as expected. When I'm trying to run ansible customercare -m ping --user=core --connection=ssh --private-key=/home/jenkins/.ssh/id_rsa I'm met with this error 10.45.1.107 | FAILED => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue And the verbose option look like this: <10.45.1.107> ESTABLISH CONNECTION FOR USER: core <10.45.1.107> REMOTE_MODULE ping <10.45.1.107> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/root/.ansible/cp/ ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'IdentityFile=/home/jenkins/.ssh/id_rsa', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=core', '-o', 'ConnectTimeout=10', '10.45.1.107', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1437988628.37-213828375275223 && chmod a+rx $HOME/. ansible/tmp/ansible-tmp-1437988628.37-213828375275223 && echo $HOME/.ansible/tmp/ansible-tmp-1437988628.37-213828375275223'"] 10.45.1.107 | FAILED => SSH encountered an unknown error. The output was: OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: auto-mux: Trying existing master debug1: Control socket "/root/.ansible/cp/ansible-ssh-10.45.1.107-22-core" does not exist debug2: ssh_connect: needpriv 0 debug1: Connecting to 10.45.1.107 [10.45.1.107] port 22. debug2: fd 3 setting O_NONBLOCK debug1: fd 3 clearing O_NONBLOCK debug1: Connection established. debug3: timeout: 9985 ms remain after connect debug1: permanently_set_uid: 0/0 debug3: Incorrect RSA1 identifier debug3: Could not load "/home/jenkins/.ssh/id_rsa" as a RSA1 public key debug1: identity file /home/jenkins/.ssh/id_rsa type 1 debug1: identity file /home/jenkins/.ssh/id_rsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7 debug1: match: OpenSSH_6.7 pat OpenSSH* compat 0x04000000 debug2: fd 3 setting O_NONBLOCK debug3: load_hostkeys: loading entries for host "10.45.1.107" from file "/root/.ssh/known_hosts" debug3: load_hostkeys: found key type ED25519 in file /root/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-ed25519-cert-v01#openssh.com,ssh-ed25519 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group- exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-ed25519-cert-v01#openssh.com,ssh-ed25519,ecdsa-sha2-nistp256-cert-v01#openssh.com,ecdsa-sha2-nistp384-cert- v01#openssh.com,ecdsa-sha2-nistp521-cert-v01#openssh.com,ssh-rsa-cert-v01#openssh.com,ssh-dss-cert-v01#openssh.com,ssh-rsa-cert-v00#openssh. com,ssh-dss-cert-v00#openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm#openssh.com,aes256-gcm#openssh.com,chacha20- poly1305#openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc#lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm#openssh.com,aes256-gcm#openssh.com,chacha20- poly1305#openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc#lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256- etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-ripemd160-etm#openssh.com,hmac-sha1-96-etm#openssh.com,hmac-md5-96-etm#openssh.com,hmac- md5,hmac-sha1,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160#openssh.com,hmac-sha1-96, hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256- etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-ripemd160-etm#openssh.com,hmac-sha1-96-etm#openssh.com,hmac-md5-96-etm#openssh.com,hmac- md5,hmac-sha1,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160#openssh.com,hmac-sha1-96, hmac-md5-96 debug2: kex_parse_kexinit: zlib#openssh.com,zlib,none debug2: kex_parse_kexinit: zlib#openssh.com,zlib,none debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: curve25519-sha256#libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ssh-ed25519 debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm#openssh.com,aes256-gcm#openssh.com,chacha20-poly1305#openssh.com debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm#openssh.com,aes256-gcm#openssh.com,chacha20-poly1305#openssh.com debug2: kex_parse_kexinit: umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac- sha1-etm#openssh.com,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: kex_parse_kexinit: umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac- sha1-etm#openssh.com,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: kex_parse_kexinit: none,zlib#openssh.com debug2: kex_parse_kexinit: none,zlib#openssh.com debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: setup hmac-sha1-etm#openssh.com debug1: kex: server->client aes128-ctr hmac-sha1-etm#openssh.com zlib#openssh.com debug2: mac_setup: setup hmac-sha1-etm#openssh.com debug1: kex: client->server aes128-ctr hmac-sha1-etm#openssh.com zlib#openssh.com debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ED25519 54:85:33:0a:6f:78:74:a7:13:7d:74:bd:03:f1:9c:ce debug3: load_hostkeys: loading entries for host "10.45.1.107" from file "/root/.ssh/known_hosts" debug3: load_hostkeys: found key type ED25519 in file /root/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys debug1: Host '10.45.1.107' is known and matches the ED25519 host key. debug1: Found key in /root/.ssh/known_hosts:1 debug1: ssh_ed25519_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home/jenkins/.ssh/id_rsa (0x7f2295d969e0), explicit debug1: Authentications that can continue: publickey,password,keyboard-interactive debug3: start over, passed a different list publickey,password,keyboard-interactive debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey debug3: authmethod_lookup publickey debug3: remaining preferred: ,gssapi-keyex,hostbased,publickey debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/jenkins/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Server accepts key: pkalg ssh-rsa blen 279 debug2: input_userauth_pk_ok: fp 53:f8:88:06:5b:c2:a3:0a:05:9f:2c:ed:3b:51:74:47 debug3: sign_and_send_pubkey: RSA 53:f8:88:06:5b:c2:a3:0a:05:9f:2c:ed:3b:51:74:47 debug1: key_parse_private2: missing begin marker debug1: read PEM private key done: type RSA debug1: Enabling compression at level 6. debug1: Authentication succeeded (publickey). Authenticated to 10.45.1.107 ([10.45.1.107]:22). debug1: setting up multiplex master socket debug3: muxserver_listen: temporary control path /root/.ansible/cp/ansible-ssh-10.45.1.107-22-core.xNa4LxZkP4s02v2j debug2: fd 4 setting O_NONBLOCK debug3: fd 4 is O_NONBLOCK debug3: fd 4 is O_NONBLOCK debug1: channel 0: new [/root/.ansible/cp/ansible-ssh-10.45.1.107-22-core] debug3: muxserver_listen: mux listener channel 0 fd 4 debug2: fd 3 setting TCP_NODELAY debug3: packet_set_tos: set IP_TOS 0x08 debug1: control_persist_detach: backgrounding master process debug2: control_persist_detach: background process is 470 Control socket connect(/root/.ansible/cp/ansible-ssh-10.45.1.107-22-core): Connection refused Failed to connect to new control master debug1: forking to background debug1: Entering interactive session. debug2: set_control_persist_exit_time: schedule exit in 60 seconds Any clue on what is going on? [UPDATE] Here's the log from a successful SSH logon: jenkins#9031c65c8952:~$ ssh core#10.45.1.107 -vvvv OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to 10.45.1.107 [10.45.1.107] port 22. debug1: Connection established. debug3: Incorrect RSA1 identifier debug3: Could not load "/home/jenkins/.ssh/id_rsa" as a RSA1 public key debug1: identity file /home/jenkins/.ssh/id_rsa type 1 debug1: identity file /home/jenkins/.ssh/id_rsa-cert type -1 debug1: identity file /home/jenkins/.ssh/id_dsa type -1 debug1: identity file /home/jenkins/.ssh/id_dsa-cert type -1 debug1: identity file /home/jenkins/.ssh/id_ecdsa type -1 debug1: identity file /home/jenkins/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/jenkins/.ssh/id_ed25519 type -1 debug1: identity file /home/jenkins/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7 debug1: match: OpenSSH_6.7 pat OpenSSH* compat 0x04000000 debug2: fd 3 setting O_NONBLOCK debug3: load_hostkeys: loading entries for host "10.45.1.107" from file "/home/jenkins/.ssh/known_hosts" debug3: load_hostkeys: found key type ED25519 in file /home/jenkins/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-ed25519-cert-v01#openssh.com,ssh-ed25519 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: curve25519-sha256#libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-ed25519-cert-v01#openssh.com,ssh-ed25519,ecdsa-sha2-nistp256-cert-v01#openssh.com,ecdsa-sha2-nistp384-cert-v01#openssh.com,ecdsa-sha2-nistp521-cert-v01#openssh.com,ssh-rsa-cert-v01#openssh.com,ssh-dss-cert-v01#openssh.com,ssh-rsa-cert-v00#openssh.com,ssh-dss-cert-v00#openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm#openssh.com,aes256-gcm#openssh.com,chacha20-poly1305#openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc#lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm#openssh.com,aes256-gcm#openssh.com,chacha20-poly1305#openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc#lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-ripemd160-etm#openssh.com,hmac-sha1-96-etm#openssh.com,hmac-md5-96-etm#openssh.com,hmac-md5,hmac-sha1,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160#openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-ripemd160-etm#openssh.com,hmac-sha1-96-etm#openssh.com,hmac-md5-96-etm#openssh.com,hmac-md5,hmac-sha1,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160#openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib#openssh.com,zlib debug2: kex_parse_kexinit: none,zlib#openssh.com,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: curve25519-sha256#libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ssh-ed25519 debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm#openssh.com,aes256-gcm#openssh.com,chacha20-poly1305#openssh.com debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm#openssh.com,aes256-gcm#openssh.com,chacha20-poly1305#openssh.com debug2: kex_parse_kexinit: umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: kex_parse_kexinit: umac-64-etm#openssh.com,umac-128-etm#openssh.com,hmac-sha2-256-etm#openssh.com,hmac-sha2-512-etm#openssh.com,hmac-sha1-etm#openssh.com,umac-64#openssh.com,umac-128#openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: kex_parse_kexinit: none,zlib#openssh.com debug2: kex_parse_kexinit: none,zlib#openssh.com debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: setup hmac-sha1-etm#openssh.com debug1: kex: server->client aes128-ctr hmac-sha1-etm#openssh.com none debug2: mac_setup: setup hmac-sha1-etm#openssh.com debug1: kex: client->server aes128-ctr hmac-sha1-etm#openssh.com none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ED25519 54:85:33:0a:6f:78:74:a7:13:7d:74:bd:03:f1:9c:ce debug3: load_hostkeys: loading entries for host "10.45.1.107" from file "/home/jenkins/.ssh/known_hosts" debug3: load_hostkeys: found key type ED25519 in file /home/jenkins/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys debug1: Host '10.45.1.107' is known and matches the ED25519 host key. debug1: Found key in /home/jenkins/.ssh/known_hosts:1 debug1: ssh_ed25519_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home/jenkins/.ssh/id_rsa (0x7fab14d1cab0), debug2: key: /home/jenkins/.ssh/id_dsa ((nil)), debug2: key: /home/jenkins/.ssh/id_ecdsa ((nil)), debug2: key: /home/jenkins/.ssh/id_ed25519 ((nil)), debug1: Authentications that can continue: publickey,password,keyboard-interactive debug3: start over, passed a different list publickey,password,keyboard-interactive debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/jenkins/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Server accepts key: pkalg ssh-rsa blen 279 debug2: input_userauth_pk_ok: fp 53:f8:88:06:5b:c2:a3:0a:05:9f:2c:ed:3b:51:74:47 debug3: sign_and_send_pubkey: RSA 53:f8:88:06:5b:c2:a3:0a:05:9f:2c:ed:3b:51:74:47 debug1: key_parse_private2: missing begin marker debug1: read PEM private key done: type RSA debug1: Authentication succeeded (publickey). Authenticated to 10.45.1.107 ([10.45.1.107]:22). debug1: channel 0: new [client-session] debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug1: Requesting no-more-sessions#openssh.com debug1: Entering interactive session. debug2: callback start debug2: fd 3 setting TCP_NODELAY debug3: packet_set_tos: set IP_TOS 0x10 debug2: client_session2_setup: id 0 debug2: channel 0: request pty-req confirm 1 debug1: Sending environment. debug3: Ignored env SHELL debug3: Ignored env TERM debug3: Ignored env USER debug3: Ignored env LS_COLORS debug3: Ignored env MAIL debug3: Ignored env PATH debug3: Ignored env PWD debug3: Ignored env SHLVL debug3: Ignored env HOME debug3: Ignored env LOGNAME debug3: Ignored env LESSOPEN debug3: Ignored env LESSCLOSE debug3: Ignored env _ debug2: channel 0: request shell confirm 1 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug2: channel_input_status_confirm: type 99 id 0 debug2: PTY allocation request accepted on channel 0 debug2: channel 0: rcvd adjust 2097152 debug2: channel_input_status_confirm: type 99 id 0 debug2: shell request accepted on channel 0 Last login: Mon Jul 27 09:49:44 2015 from 172.17.0.37 CoreOS stable (717.3.0) core#localhost ~ $
I had the same problem with ansible running in a docker container on a coreOS host. With the help of this thread, i could follow it up to the -O ControlPath option. Switching off acceleration didn't help for me though. Changing the ssh_args= line to empty string did the trick for me.
I found here that one of the reasons why ssh pipelining fails in docker is a bug when using overlay storage driver. Then a quick fix is to change directory of control path. In /etc/ansible/ansible.cfg add [ssh_connection] control_path_dir=/dev/shm/ansible_control_path
Turning off the accelerate option did the trick. So in /etc/ansible/ansible.cfg I added accelerate: false and commented out the other accelerate options. Seems to work. Thanks a lot Thomasleveil