How to Authorize SSH Access for Remote Client
This little Guide shows you Step-by-Step How to Authorize the SSH Remote Access to Server for a Remote Linux/Unix Client.
Practically you will Need to Add an Entry to the Authorized Keys List on the id_dsa.pub File on your Home .ssh Directory.
-
How to Easy Generate SSH Keys Pair:
-
To Upload the Key to the Server you need the SSH Access Password.
For Shared Hosting Account often that’s the Same as the cpanel one.
-
Upload It by the rsync Command:
rsync -av -e "ssh -p PORT-NUMBER" ~/.ssh/id_dsa.pub USERNAME@SERVER-ADDRESS:~/
You need to Substitute PORT-NUMBER, USERNAME and SERVER-ADDRESS with your Hosting Parameters.
-
SSH Log-In into the Remote:
ssh -p PORT-NUMBER USERNAME@SERVER-ADDRESS
Normaly now you will be Prompt for the Password to get Access.
-
Copy the Key into the Authorized List:
cat id_dsa.pub >> .ssh/authorized_keys
-
Latest Check than you haven't any blank line inserted into the ssh Keys Stack with:
cat .ssh/authorized_keys
-
After is Time to Try your Newly Authorized SSH Access with:
Possibly Close the SSH Session with:
logout
LogIn:
ssh -p PORT-NUMBER USERNAME@SERVER-ADDRESS
And like a Charm you should Get Direct Access into the Server.