Quantcast
Channel: gcloud SSH connection asks for password instead of passphrase - Server Fault
Viewing all articles
Browse latest Browse all 4

gcloud SSH connection asks for password instead of passphrase

$
0
0

I've got two VMs set up on Google Cloud Platform. server1 uses an Ubuntu 16.04 image [g1-small (1 vCPU, 1.7 GB memory)]; and the newly created VM, called server2, uses a CoreOS Stable image [f1-micro (1 vCPU, 0.6 GB memory)].

The main problem is I can't connect to server2 even though I'm using the same SSH Key and user.

I'll be using this link to compare two output results from ssh -v.


To make sure I tested this right I erased the files google_compute_engine, google_compute_engine.pub, google_compute_known_hosts and the contents from known_hosts in the folder /Users/userz/.ssh.

Then executed the command gcloud initand then gcloud compute config-ssh, which detected that there's no SSH Keys and guided me through the creation of a new one while asking for a passphrase, not a password. That new SSH Key is the one being used in this test.

If you see the first link for server1, ssh ends up asking for the passphrase. But for server2 ssh ends up asking for a password, where it does not matter what I enter, it just comes as a wrong input every time.

The passwords I tried were: the same passphrase, my login password for the google account, the admin password of the local machine, and every other password I can remember using. And yet wrong input.

Why is there this difference when I'm using the same method to connect to the VMs? What can I do to solve this, since I do not know nor did setup any password on server2 (newly created)?

I may add as a note that connecting through Cloud Shell asks for the passphrase and connects easily.


server1 output:

ssh -v server1OpenSSH_7.4p1, LibreSSL 2.5.0debug1: Reading configuration data /Users/userz/.ssh/configdebug1: /Users/userz/.ssh/config line 51: Applying options for server1debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Connecting to XXX.XXX.XX.XX [XXX.XXX.XX.XX] port 22.debug1: Connection established.debug1: identity file /Users/userz/.ssh/google_compute_engine type 1debug1: key_load_public: No such file or directorydebug1: identity file /Users/userz/.ssh/google_compute_engine-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_7.4debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.2debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 pat OpenSSH* compat 0x04000000debug1: Authenticating to XXX.XXX.XX.XX:22 as 'userz'debug1: using hostkeyalias: compute.hostkeyaliasXdebug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: algorithm: curve25519-sha256@libssh.orgdebug1: kex: host key algorithm: ecdsa-sha2-nistp256debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ecdsa-sha2-nistp256 SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxdebug1: using hostkeyalias: compute.hostkeyaliasXdebug1: Host 'compute.hostkeyaliasX' is known and matches the ECDSA host key.debug1: Found key in /Users/userz/.ssh/google_compute_known_hosts:1debug1: rekey after 134217728 blocksdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: rekey after 134217728 blocksdebug1: SSH2_MSG_EXT_INFO receiveddebug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>debug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickeydebug1: Next authentication method: publickeydebug1: Offering RSA public key: /Users/userz/.ssh/google_compute_enginedebug1: Server accepts key: pkalg rsa-sha2-512 blen 279Enter passphrase for key '/Users/userz/.ssh/google_compute_engine':

server2 output:

ssh -v server2OpenSSH_7.4p1, LibreSSL 2.5.0debug1: Reading configuration data /Users/userz/.ssh/configdebug1: /Users/userz/.ssh/config line 43: Applying options for server2debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Connecting to YY.YYY.YYY.YYY [YY.YYY.YYY.YYY] port 22.debug1: Connection established.debug1: identity file /Users/userz/.ssh/google_compute_engine type 1debug1: key_load_public: No such file or directorydebug1: identity file /Users/userz/.ssh/google_compute_engine-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_7.4debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000debug1: Authenticating to YY.YYY.YYY.YYY:22 as 'userz'debug1: using hostkeyalias: compute.hostkeyaliasYdebug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: algorithm: curve25519-sha256debug1: kex: host key algorithm: ecdsa-sha2-nistp256debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ecdsa-sha2-nistp256 SHA256:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyydebug1: using hostkeyalias: compute.hostkeyaliasYdebug1: Host 'compute.hostkeyaliasY' is known and matches the ECDSA host key.debug1: Found key in /Users/userz/.ssh/google_compute_known_hosts:3debug1: rekey after 134217728 blocksdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: rekey after 134217728 blocksdebug1: SSH2_MSG_EXT_INFO receiveddebug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>debug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickey,password,keyboard-interactivedebug1: Next authentication method: publickeydebug1: Offering RSA public key: /Users/userz/.ssh/google_compute_enginedebug1: Authentications that can continue: publickey,password,keyboard-interactivedebug1: Next authentication method: keyboard-interactivePassword:

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>