Hello,
I have a scenario where there are two accounts on the same server dev and live. I'm trying to create an rsync function to sync dev's public_html to the live public_html folder. In my testing I have created an SSH key pair on live using the cpanel key manager. Now the odd part.
I first test the private from my desktop computer to the live account like this:
ssh -i /Users/Desktop/id_rsa_dev2 -p 12345 [email protected][public-ip]
This works as you'd expect. I did make sure the id_rsa_dev2 private key had permissions of 0600 and 12345 is a none-standard port.
Now I go back to the server and login to the dev cpanel account and click on the terminal function from the cpanel. I have already uploaded the id_rsa_dev2 private key to .ssh in the dev account. My terminal command looks like this:
[[email protected] ~]$ssh -i /home/dev.user/.ssh/id_rsa_dev2 -p 12345 [email protected]
Load key "/home/dev.user/.ssh/id_rsa_dev2": invalid format
[email protected]'s password:
The format has not changed. It is the same file from my desktop test that starts with "-----BEGIN OPENSSH PRIVATE KEY-----". I cannot seem to get the local server client to work with private key from the local server.
Of course if i enter the live.user password it connects. However, I need this rsync to to work with our user password.
Any suggestions on where to start with this? Again it works from my desktop computer without error.
Thanks,
I have a scenario where there are two accounts on the same server dev and live. I'm trying to create an rsync function to sync dev's public_html to the live public_html folder. In my testing I have created an SSH key pair on live using the cpanel key manager. Now the odd part.
I first test the private from my desktop computer to the live account like this:
ssh -i /Users/Desktop/id_rsa_dev2 -p 12345 [email protected][public-ip]
This works as you'd expect. I did make sure the id_rsa_dev2 private key had permissions of 0600 and 12345 is a none-standard port.
Now I go back to the server and login to the dev cpanel account and click on the terminal function from the cpanel. I have already uploaded the id_rsa_dev2 private key to .ssh in the dev account. My terminal command looks like this:
[[email protected] ~]$ssh -i /home/dev.user/.ssh/id_rsa_dev2 -p 12345 [email protected]
Load key "/home/dev.user/.ssh/id_rsa_dev2": invalid format
[email protected]'s password:
The format has not changed. It is the same file from my desktop test that starts with "-----BEGIN OPENSSH PRIVATE KEY-----". I cannot seem to get the local server client to work with private key from the local server.
Of course if i enter the live.user password it connects. However, I need this rsync to to work with our user password.
Any suggestions on where to start with this? Again it works from my desktop computer without error.
Thanks,
Last edited by a moderator: