What I’m trying to do:
To remove password authentication when I use git to pull anvil projects.
What should I try?
What I’ve tried and what’s not working:
-
register ssh public key on my account setting
-
specify key on config file
configHost anvil.works #IdentityFile ~/.ssh/id_rsa IdentityFile ~/.ssh/id_ecdsa
-
test connect with following statement
ssh -p 2222 -i ~/.ssh/id_ecdsa -l [my-login] anvil.works -v
Test Connect ResultOpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 debug1: Reading configuration data /home/anvil/.ssh/config debug1: /home/anvil/.ssh/config line 1: Applying options for anvil.works debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 58: Applying options for * debug1: Connecting to anvil.works [52.56.203.177] port 2222. debug1: Connection established. debug1: identity file /home/anvil/.ssh/id_ecdsa type 3 debug1: key_load_public: No such file or directory debug1: identity file /home/anvil/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/anvil/.ssh/id_ecdsa type 3 debug1: key_load_public: No such file or directory debug1: identity file /home/anvil/.ssh/id_ecdsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.4 debug1: Remote protocol version 2.0, remote software version APACHE-SSHD-2.8.0 debug1: no match: APACHE-SSHD-2.8.0 debug1: Authenticating to anvil.works:2222 as 'EMAIL' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: ecdh-sha2-nistp256 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: kex: ecdh-sha2-nistp256 need=64 dh_need=64 debug1: kex: ecdh-sha2-nistp256 need=64 dh_need=64 debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ssh-rsa SHA256: debug1: Host '[anvil.works]:2222' is known and matches the RSA host key. debug1: Found key in /home/anvil/.ssh/known_hosts:5 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<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,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,sk-ecdsa-sha2-nistp256@openssh.com,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: password,keyboard-interactive,publickey debug1: Next authentication method: publickey debug1: Offering ECDSA public key: /home/anvil/.ssh/id_ecdsa debug1: Authentications that can continue: password,keyboard-interactive,publickey debug1: Offering RSA public key: /home/anvil/.ssh/id_rsa debug1: Authentications that can continue: password,keyboard-interactive,publickey debug1: Offering ECDSA public key: /home/anvil/.ssh/id_ecdsa debug1: Authentications that can continue: password,keyboard-interactive,publickey debug1: Next authentication method: keyboard-interactive Password authentication Password:```
-
First I registered rsa public key, it doesn’t work, so I regen ecdsa key and registered now, it doesn’t work either.