DEV Community

Cover image for Login to the server without password
Mohammad Reza
Mohammad Reza

Posted on

3 2 1 1 1

Login to the server without password

That is a very nice way if you want to dont write your password for every login to the server :)

cd ~/.ssh
ls
Enter fullscreen mode Exit fullscreen mode

If you have "id_rsa.pub" you dont need to generate it but if you dont have it lets make it

ssh-keygen -o -t rsa -C "azibom@gmail.com"
Enter fullscreen mode Exit fullscreen mode

Now you should see it in ~/.ssh
Lets copy it

cat ~/.ssh/id_rsa.pub
Enter fullscreen mode Exit fullscreen mode

Then you need to login to the server and add this key to the remote server
Run this command

nano .ssh/authorized_keys
Enter fullscreen mode Exit fullscreen mode

And paste what you copied at the end of this file
And now you have login to the server without password :)

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay