Secure web communications
Communications errors
Unable to connect to SFTP host
Secure File Transfer Protocol, SFTP, uses SSH to build a secure connection to a host in order to transfer files. Occasionally we find that we cannot connect to a SFTP host previously available, even though the server is responding on the same port, usually 22, to ping or telnet requests.
The most common problem is that the host has updated its authentication keys, and the local computer is storing an outdated key. The solution to this problem is to delete the old key. On Mac OS X or *nix systems, one can remove the old key with a terminal command, substituting the host address for ftphostname:
ssh-keygen -R ftphostname
This command removes from the file known_hosts , stored in ~/.ssh/ , any line that has that host address, allowing your ssh or SFTP software to generate a new line for the new key. A version of the file before the removal is created called known_hosts.old , in case you need the old key for any reason.