I've been working on moving my backup scheme from plain old FTP to SFTP (over SSH). So far, I have been able to:
- Generate the keys on my home Mac
- Install them on the server I will be FTPing to
- After this was done, I disabled authentication using passwords
- I am able to authenticate to the server from multiple points, using the keys in place of a password:
- Home Mac via SSH
- Home Mac via Cyberduck FTP
- Remote / Office PC using PuttyFTP
So I know at this point SSH works with key authentication from multiple sources. So far, so good.
For my site on SiteGround, I have done the following:
- Created a folder outside of the web structure called "ssh"
- Uploaded the public and private keys to this folder
- Set permissions to 600 on both files
- Created a new profile in Akeeba Backup to test the configuration
- Set the Host, Port, Username, Password (used in the key), and the path to the Private and Public keys, as well as the Initial Directory
When I test the connection, I get the following message:
Cannot log in to SFTP server using key files [username:private_key_file:public_key_file:password] = (Username):/home/customer/www/madalynmckay.com/akeeba/ssh/id_rsa:/home/customer/www/madalynmckay.com/akeeba/ssh/id_rsa.pub:(Key Password)
I know the key works, because I can successfully use it from multiple other locations. SSH2 is enabled in PHP, and I've checked and re-checked the path and permissions on the two Key files. Any guidance as to why the keys may be rejected?