Step 1: Generate keys in your local computer
Step 2: Copy your public key (which you have just generated in the previous step) to the server you want to connect to
Done!
Now you can login to the server from your computer through SSH Keys (no need to enter password each time)
Optional (for server administrators): disable ROOT login through password for security once you have setup logging in with SSH keys successfully.
ssh-keygen -t rsa
Step 2: Copy your public key (which you have just generated in the previous step) to the server you want to connect to
cat ~/.ssh/id_rsa.pub | ssh username@server.example "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys"
Done!
Now you can login to the server from your computer through SSH Keys (no need to enter password each time)
Optional (for server administrators): disable ROOT login through password for security once you have setup logging in with SSH keys successfully.
Comments
Post a Comment