Can't SSH into Build Machine

@turbomerl Thanks for the update. Can you lodge a support ticket from the account you’re using and we can enable SSH for OS X for your account.

Thank you for looking into this tom, I’ve also created a support ticket several days ago

https://circleci.zendesk.com/hc/en-us/requests/6559

I can see the “Enable SSH” row during the build and get the link just fine but the authentication does not work… I am the owner of the github organization too, and was the one who created all the repos.

@glesage Thanks for the info. Sorry we hadn’t responded to your ticket yet - it’s been a bit hectic this week!

Hey FYI everyone, apparently circle-ci has to “enable SSH for the organization” before we can use it… so its not broken, its just turned off.

Just to clarify - this is just for builds running on OS X

1 Like

@tom - thanks for that! I will file a ticket

@tom - I don’t seem to have the ability to file a ticket yet - is this because I am just coming to the end of my free trial and haven’t gone on to the paid program yet, or am I being dim? Thanks :slight_smile:

@turbomerl Sorry about that - ticket support via the UI is for paid plans only. You can send an email to sayhi@ and I’ll get it set up for you.

thanks @tom - I submitted the request and mentioned you.

Same issue (((

livarava-develop@scephei:~$ ssh -vvv -p 64745 ubuntu@54.161.57.211
OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t  3 May 2016
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 54.161.57.211 [54.161.57.211] port 64745.
debug1: Connection established.
debug1: identity file /home/livarava-develop/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/livarava-develop/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/livarava-develop/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/livarava-develop/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/livarava-develop/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/livarava-develop/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/livarava-develop/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/livarava-develop/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6 pat OpenSSH_6.6.1* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug3: put_host_port: [54.161.57.211]:64745
debug3: load_hostkeys: loading entries for host "[54.161.57.211]:64745" from file "/home/livarava-develop/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/livarava-develop/.ssh/known_hosts:4
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
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-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-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,ssh-ed25519,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,arcfour256,arcfour128,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,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
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,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
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,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,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,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-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519
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
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 umac-64-etm@openssh.com
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug2: mac_setup: setup umac-64-etm@openssh.com
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 e2:f5:9b:4c:bd:72:6d:cf:43:95:2d:ef:db:4e:e3:61
debug3: put_host_port: [54.161.57.211]:64745
debug3: put_host_port: [54.161.57.211]:64745
debug3: load_hostkeys: loading entries for host "[54.161.57.211]:64745" from file "/home/livarava-develop/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/livarava-develop/.ssh/known_hosts:4
debug3: load_hostkeys: loaded 1 keys
debug3: load_hostkeys: loading entries for host "[54.161.57.211]:64745" from file "/home/livarava-develop/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/livarava-develop/.ssh/known_hosts:4
debug3: load_hostkeys: loaded 1 keys
debug1: Host '[54.161.57.211]:64745' is known and matches the ECDSA host key.
debug1: Found key in /home/livarava-develop/.ssh/known_hosts:4
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: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/livarava-develop/.ssh/id_rsa (0x7fb7d0b53220),
debug2: key: /home/livarava-develop/.ssh/id_dsa ((nil)),
debug2: key: /home/livarava-develop/.ssh/id_ecdsa ((nil)),
debug2: key: /home/livarava-develop/.ssh/id_ed25519 ((nil)),
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
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/livarava-develop/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/livarava-develop/.ssh/id_dsa
debug3: no such identity: /home/livarava-develop/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /home/livarava-develop/.ssh/id_ecdsa
debug3: no such identity: /home/livarava-develop/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/livarava-develop/.ssh/id_ed25519
debug3: no such identity: /home/livarava-develop/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).
bash: handle_virtualenv: command not found

I’ve got this issue too. Do I need to enable something on the account?

Hello @kariavka, @danielcompton,

Could you please reach out to support@circleci.com and we’ll figure this out?

Best,
Zak

Hello @zzak,

I have a similar issue but it is not occurring all the time.

Here are extracts of ssh -v
In a scenario I can connect to the instance:
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: xxx
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).

When it is not working:
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: xxx
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).

Hope that helps. I can send you a full log on ssh -vif you want.

So I am new to CircleCI - and I am trying to figure out myself - but dumb question - do I need a container for me to ssh into or I can ssh into a specific instance for that build so I can debug also?

[Update]
Ok maybe I was confusing myself a little when I saw “Add Container” in my build - it already uses a container already for free ( i think) - so In my build I saw the following:

ssh -p 64544 54.162.166.58 on the ENABLE SSH job - I take it that is something specific for CircleCI to access, but I tried to do ssh -i mybitbucket-id-rsa -p 64544 54.162.166.58 - still no go since I read somewhere for the following to do:

$ ssh -i /Users/me/.ssh/id_rsa_github -p 64784 ubuntu@54.224.97.243

But I also assume ubuntu up there would be my username on circleCI right?

Ok I figured it out - it was me not adding my ssh key to my ssh agent. BUT another issue I see is that my container does not have the correct configured ssh key I inputted on the build’s SSH setting.

circleci@7d95b82a8ff5:~/.ssh$ ls -l
total 8
-rw------- 1 circleci circleci 1676 Mar 5 17:26 id_rsa
-rw-r–r-- 1 circleci circleci 1672 Mar 5 17:26 known_hosts

Like if I added a key called tp-dev

I should see tp-dev in that directory right?

Hi Team,

Iam facing ssh issue when Iam trying to do build in ubuntu machine.Could you please suggest solution for this.

debug1: No more authentication methods to try.

Permission denied (publickey).

Exited with code 255

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.