/home/shakir

Configure passwordless login in ssh

Posted on 01 Jan, 2008, categorized under Information Insemination



This post is just a quick recap on how to configure passwordless ssh login.

In my setting, herugrim is my local machine, and anduril is the remote machine with the ip address of 192.168.1.10

The first step is to (optionally) generate RSA key for use with SSH. Make sure you dont use any passphrase for this or you’ll later need to enter the passphrase upon login instead of password, which doesn’t really server our purpose here.

shakir@herugrim ~ $ ssh-keygen -t rsa -C shakir@192.168.1.10
Generating public/private rsa key pair.
Enter file in which to save the key (/home/shakir/.ssh/id_rsa): /home/shakir/.ssh/id_rsa.192.168.1.10
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/shakir/.ssh/id_rsa.192.168.1.10.
Your public key has been saved in /home/shakir/.ssh/id_rsa.192.168.1.10.pub.
The key fingerprint is: 11:d9:23:2e:68:05:59:d9:ac:5a:00:69:17:3a:b4:24  

Now we can copy the public key to the server. Instead of doing it manually, OpenSSH has a nice program to do just what we need:

shakir@herugrim ~ $ ssh-copy-id -i .ssh/id_rsa.192.168.1.10.pub shakir@192.168.1.10

So now lets test if our passwordless login is successful:

shakir@herugrim ~ $ ssh shakir@192.168.1.10 -i .ssh/id_rsa.192.168.1.10
shakir@anduril:~$

Great, it works :) The next thing to do is to just make sure you keep your private key safe..





Looking for something else? Search Google.

No Responses to "Configure passwordless login in ssh"

Comment Form


  • si perda: wah.. boleh kasi need for speed test power skali... boleh layan network race ni...
  • Faiz: wah....harganya berapa?
  • shakir: Hmm, I have no lab and that actually was my living room :D Sure I'll move them to one of my available rooms at home and make it a lab, but that'll be
  • peja: whoaaa..at least u have ur own lab...look interesting!
  • Qing Ru: He looks really cute! Fatherhood must have been quite rewarding :)
  • shakir: Chris: Thanks, I've updated the post.
  • shakir: tak cukup banyak guinea pig yang dah try and comment on the wimax service, and so I'll just wait :D
  • shakir: Vadim: Yup, but I prefer to just install dosbox and play the game rather than re-installing my system with 32 bit Linux :D
  • Vadim: 2shakir: wine doesn't support 64-bit linux. You have to use 32-bit linux if you want to use wine.
  • kevler: yerp ...dalam 2 hari nih jer ..aku dah kesan 2 BMW X6 , kat puchong dan jalan ampang ..giler laa lawa



Disclaimer

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my own personal opinion. Inappropriate comments will be deleted at the authors discretion. All code samples (if any, ever) are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Personal (Blogs) - TOP.ORG