Browsing all articles tagged with ssh
Jan
1

Configure passwordless login in ssh

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..

Connect with me


What I'm Doing (via twitter)...

  • is applying for US visa. The website is not helping at all http://twitpic.com/16hvxp 1 week ago
  • @abumuaaz want to focus on my wireless project (yes, I get paid for that) and some development work. Ada job to pass ka? :) in reply to abumuaaz 1 week ago
  • is running 'sudo dd if=/dev/zero of=/dev/sda' on his laptop. Will it work, my computer forensic friends? 1 week ago
  • is on his first day of being jobless, hahaha. 1 week ago
  • finished reading Crowdsourcing: Why the Power of the Crowd Is Driving the Future of Business, in 32 hours. Next, Wikinomics. 1 week ago
  • is on his way to island hopping. Woohoo! 1 week ago
  • is leaving on a jetplane, don't know when he'll be back again... 2 weeks ago
  • missed his flight to KK. Will need to take the first flight tomorrow and pray he'll make it for his 9am meeting. 2 weeks ago
  • More updates...

Categories

Tags

bash blog book database debian embedded gutsy howto hsdpa html kde kubuntu linux lpi nature network Photoblog photography php pylons python recovery script security shell sqlalchemy ssh ubuntu vim wireless wordpress

Blogroll

Flickr Photostream
DSC 0336Do not pluck the tea leaves... Yeah, right.I am Super Faiq, and I have a D3!But we don't have much time to cover the whole area.The truth behind your cup of tea, muahahaha....It's my thing. I can do it eyes closed.We wander around the tea plantationTrying out Teletubbies modelingWe get bored easily, and within minutes we're already at a tea plantation.