I’m attempting to use SSH to access my server and then perform a “git pull.” The issue I’m having is that once the “ssh $pythonAnywhereUser@ssh.pythonanywhere.com” is performed, the following message appears and theres nothing else that I can do. I do not see the line that asks “Yes/No” either.
The authenticity of host 'ssh.pythonanywhere.com (23.21.200.247)' can't be established. RSA key fingerprint is SHA256:zy2jmqxNg/fs6tFZK55OjHTI3B2UofzOiUvTPtcX3/Y.
The message Are you sure you want to continue connecting (yes/no)? does not appear in order for me to enter “yes”
Here’s a copy of my job:
build:
docker:
- image: circleci/python:3.7
working_directory: /home/circleci/project
steps:
- add_ssh_keys:
fingerprints:
- “0f:00:ad:9b:75:5b:24:f7:77:ed:65:09:a9:73:d8:33”
- checkout
- run:
command: pip install -r requirements.txt
- run:
command: python manage.py test wizard
- run:
command: ssh $pythonAnywhereUser@ssh.pythonanywhere.com
Is there anything obvious that I could be missing? I have no had any success with many different approaches including manually adding ssh.pythonanywhere to known hosts. Any help is appreciated!
@yannCI Yes, I can confirm that I followed the steps outlined in the documentation. I ran ssh-keygen inside of my server and added the private key in CircleCi project settings. Adding the key via the fingerprint in the job was successful.
@yannCI yes, i’ve done this level of troubleshooting. I can successfully connect from my local machine. it did ask for confirmation and i entered ‘yes.’ It also asks me for the password for the pythonanywhere account. I think this could be an issue on the circleci side.
@bilalsattar24, if you’re prompted to confirm, and then to enter your username and password, it actually means that the SSH key isn’t taken into account when you connect that server. Otherwise, it would log you in straight away.
The purpose of using SSH key authentication is to bypass the credentials authentication. This is what is described in the “Passwordless Logins” section of this pythonanywhere guide.
Which machine did you generate the key on (i.e. which machine did you run the ssh-keygen -t rsa -b 2048 command on)?
If you didn’t run the command on the pythonanywhere server, did you copy the key to the ssh.pythonanywhere.com server after generating it?