You are on page 1of 3

7/17/15

Connecting via SSH without password prompt ~ Codingfreak

/* Ajith - Syntax Higlighter - End ----------------------------------------------- */

Codingfreak
Home

Algorithms

Data Structures

Linux

4.06.2012

GOOGLE+ FOLLOWERS

Connecting via SSH without password prompt

codingfreak

SSH is the common way to connect remote machines these days. Almost all kinds of applications use SSH in background for
communicating with end machines.
But sometimes typing password repeatedly for establishing a SSH connection with the trusted end machine is quite daunting
task.
Let us see how to automate the things in 3 simple steps where we can ssh to "user@host" without asking a password every
time. Replace user with the username and host with the remote machine ip-address or hostname. For E.g.
john@192.168.245.129
NOTE: Only do this with trusted machines.

83 have us in circles

PROGRAMMERS THAT INSPIRE ME

Fabrice Bellard
TRANSLATE

Select Language
Pow ered by

Translate

1. Login to your local machine from which you want to ssh to remote machine. Go to your .ssh folder.
view plain print ?
01.

cd ~/.ssh

2. Check if you have a 'id_rsa.pub' (or 'id_dsa.pub') file in .ssh folder. If not, try below command:
view plain print ?
01.

ssh-keygen -t rsa

To make it simple just keep on pressing the ENTER key a bunch of times, even when it asks for a password.
3. Run ssh-copy-id
view plain print ?
01.

ssh-copy-id -i id_rsa.pub user@host

If it asks for remote machine password then provide it so that it can create a security key successfully so that you dont
need to remember password everytime.

Its done .. Now you can ssh to user@host without being prompted for password.
LABELS

codingfreak.blogspot.com/2012/04/connectig-via-ssh-without-password.html

1/3

7/17/15

Connecting via SSH without password prompt ~ Codingfreak


Announcement Asterix Audio

Labels: How to , Linux

Computer

DataStructures

2 comments :

Organiz
Facts

Hacking Hardware

How to

Interview Question
Laptop Linked List Linux

Anonymous June 30, 2012 at 4:30 AM

Mobile Netw orks Open Source


Signals Software Stack Windows

I was working for a while on this with no progress but your article saved me....Thank you so much!! :)
Reply

BLOG ARCHIVE

Anonymous October 25, 2012 at 7:15 PM

2013 ( 8 )

It's a life saviour!!


I work on more than 30 servers with 11 application users. Now using your article, I configured it and its working absolutely
fine. Thanks a lot!!

2012 ( 21 )

Reply

December ( 2 )
November ( 2 )
September ( 1 )
August ( 2 )
July ( 1 )

Enter your comment...

June ( 1 )
May ( 1 )
April ( 2 )

Comment as:

Publish

Google Account

Uli Drepper - Basics you sh


know about buffer ...
Connecting via SSH withou
password prompt

Preview

March ( 4 )
February ( 3 )
January ( 2 )
2010 ( 8 )
Your comments are moderated

2009 ( 31 )
2008 ( 18 )
2007 ( 1 )

Newer Post

Home

Older Post

Subscribe to: Post Comments ( Atom )

codingfreak.blogspot.com/2012/04/connectig-via-ssh-without-password.html

2/3

7/17/15

Connecting via SSH without password prompt ~ Codingfreak


Template images by enot-poloskun. Powered by Blogger.

codingfreak.blogspot.com/2012/04/connectig-via-ssh-without-password.html

3/3