I'm having trouble gaining passwordless access to the Python Anywhere console using a public/private key pair. I have followed the instructions in the tutorial but I am still being prompted for my password when I try to connect.
Here is what I'm doing in my terminal:
MacBook-Pro-3:.ssh joseph$ ssh-keygen -t ecdsa
Generating public/private ecdsa key pair.
Enter file in which to save the key (/Users/joseph/.ssh/id_ecdsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/joseph/.ssh/id_ecdsa
Your public key has been saved in /Users/joseph/.ssh/id_ecdsa.pub
The key fingerprint is:
SHA256:Kc2/cEf3lu4Gt7luLvsaNMi97VnEV5ZAi3YlAC2C0UU joseph@MacBook-Pro-3.local
The key's randomart image is:
+---[ECDSA 256]---+
| .+ oEo.o+ . |
| . o . .. = .|
| . .o o .o|
| o .o + o.|
| . S o.+. +|
| . . ..o++o|
| . o .ooo*|
| o o .+*o|
| . o@X.|
+----[SHA256]-----+
MacBook-Pro-3:.ssh joseph$ ssh-copy-id -i id_ecdsa Legroom6828@ssh.pythonanywhere.com
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "id_ecdsa.pub"
The authenticity of host 'ssh.pythonanywhere.com (23.21.200.247)' can't be established.
RSA key fingerprint is SHA256:zy2jmqxNg/fs6tFZK55OjHTI3B2UofzOiUvTPtcX3/Y.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
<<<<<<:>~ PythonAnywhere SSH. Help @ https://help.pythonanywhere.com/pages/SSHAccess
Legroom6828@ssh.pythonanywhere.com's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'Legroom6828@ssh.pythonanywhere.com'"
and check to make sure that only the key(s) you wanted were added.
MacBook-Pro-3:.ssh joseph$ cat id_ecdsa.pub
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNoEniqAVfwJ9PixJSdT8qb+H4NcgC0Q5yLik4JWds/mFThM2+nJtghxdACxqGS02J9ed7jfvX9dC9dkz2a/jr4= joseph@MacBook-Pro-3.local
MacBook-Pro-3:.ssh joseph$
Here is what my .ssh folder on Python Anywhere is showing.
01:25 ~/.ssh $ ls
authorized_keys
01:25 ~/.ssh $ cat authorized_keys
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNoEniqAVfwJ9PixJSdT8qb+H4NcgC0Q5yLik4JWds/mFThM2+nJtghxdACxqGS02J9ed7jfvX9dC9dkz2a/
jr4= joseph@MacBook-Pro-3.local
01:25 ~/.ssh $
What am I doing wrong?