Conencting Remote Host without password with RSA/DSA PUBKEY for SSH/SCP.

OKEY

a tech blog i would say after ages.

now what i was thinking few days back to connect to my dev server from my own box without typing PASSWORD again and again.So this is what i did actually

so what i did kindaa 2 simple.

1.on my computer

i generated a key with simple command
<-------------------------------------------------------------------------------------------------------------->
koolhead17@debian:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/koolhead17/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/koolhead17/.ssh/id_rsa.
Your public key has been saved in /home/koolhead17/.ssh/id_rsa.pub.
The key fingerprint is:
7c:7a:35:a3:7f:05:e5:02:08:08:e5:eb:24:1e:cb:f7 koolhead17@debian
<-------------------------------------------------------------------------------------------------------------->

I also sent the public key to my server with scp command and providing it password for one last time. Sticking out tongue

now what i will do is at server side is damm neat/simple.kickass is the user at the server side
<------------------------------------------------------------------------------------->
kickass@debian:~$mkdir .ssh
kickass@debian:~$chmod 700 .ssh
kickass@debian:~$cat id_rsa.pub >> .ssh/authorized_keys
<--------------------------------------------------------------------------------------------->
In case what have i done here.
OMG i have simple added my public key to the "authorized_keys" file of kickass

So now the identity of user koolhead17 has allready been provided to "kickass" i can simply login to kickass without password.
Incredibly simple.

Smiling

Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

User login

Navigation

Syndicate

Syndicate content