Forums

Difficulties to connect via FileZilla

Salut!

My SSH connection is working perfectly with ssh.pythonanywhere.com:

  • added my public key id_rsa.pub into the authorized_keys file in ~/.ssh
  • experienced no problem ssh'ing into ssh.pythonanywhere.com
~$ ssh my_login@ssh.pythonanywhere.com
<<<<<<:>~ PythonAnywhere SSH. Help @ https://help.pythonanywhere.com/pages/SSHAccess
/home/my_login: custom profile loaded...
13:31 ~ $

With regards to FileZilla, another story... Impossible to connect either via FTP or SFTP (with credentials or key file).

Status:       Connecting to ssh.pythonanywhere.com...
Status:       Connected to ssh.pythonanywhere.com
Error:        Connection timed out after 20 seconds of inactivity
Error:        Could not connect to server
Status:       Waiting to retry...
Status:       Connecting to ssh.pythonanywhere.com...
Response:     fzSftp started, protocol_version=7
Command:      keyfile "/my_local/.ssh/id_rsa.ppk"
Command:      open "my_login@ssh.pythonanywhere.com" 22
Status:       Connected to ssh.pythonanywhere.com
Error:        Connection timed out after 20 seconds of inactivity
Error:        Could not connect to server

Has anyone experienced such a problem before? Would the ssh service need to be restarted from the pythonanywhere server side?

I'm seeing a difference between "id_rsa.pub" and "id_rsa.ppk" in your outputs there, could that be relevant?

Also, be aware that you'll get blocked for an hour after 3 invalid login attempts...

Hello Harry!

Thanks your post. The ".ppk" extension is a key format compliant with FileZilla. I've tried to SFTP again (after an hour) but unfortunately the connection has timed out again. Clearly an issue on the SFTP connection as SSH working without any problem from the terminal...

what if you try using your password to login instead of the ppk? do you have your ppk added to your authorized_keys list? otherwise it makes sense that you won't be able to login.

also make sure you have the correct upper/lower case for your username etc

Salut Conrad!

Thanks a lot for your late reply.

The ssh connection is working perfectly fine from the terminal. However, the sftp connection seems to failed from the terminal. Eventually found the issue on stackexchange,

Do you have any text going to the console in any of your .profile files?
This can mess with sftp connectivity.

Removing echo statements from .bashrc seemed to resume the connection... No comment.

Ah. Good catch. That's something we should probably include in the docs. Perhaps there's some way to say in the .bashrc "only do this if it's a user terminal" or something.