You are on page 1of 26

Search

Select Language Powered by Translate


Donate to TecMint
Advertise
Linux Services
About
Archives
Contact Us
Copyright Policy
Home
Linux Distros
Interview Questions
Shell Scripting
Free Linux eBooks
Linux Commands
Did You Know?
We are pleased to announce our new TecMint Q/A section
to submit your Linux questions
SSH Passwordless Login Using SSH Keygen in 5
Easy Steps
By Ravi Saive Under: CentOS, Fedora, Linux Distros, RedHat On: October 15, 2012
Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators
SSH (Secure SHELL) is an open source and most trusted network protocol that is
used to login into remote servers for execution of commands and programs. It is
also used to transfer les from one computer to another computer over the
network using secure copy (SCP) Protocol.
In this article we will show you how to setup password-less login using ssh keys to
connect to remote Linux servers without entering password. Using Password-less
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
1 of 26 Monday 01 September 2014 11:11 AM
login with SSH keys will increase the trust between two Linux servers for easy
le synchronization or transfer.
Setup SSH Passwordless Login
If you are dealing with number of Linux remote servers, then SSH Password-less
login is one of the best way to automate tasks such as automatic backups with
scripts, synchronization les using scp and remote command execution.
In this example we will setup SSH password-less automatic login from server
192.168.1.1 as user tecmint to 192.168.1.2 with user sheena.
Step 1: Create Authentication SSH-Kegen Keys on
(192.168.1.1)
First login into server 192.168.1.1 with user tecmint and generate a pair of
public keys using following command.
[tecmint@tecmint.com ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/tecmint/.ssh/id_rsa): [Press enter key]
Created directory '/home/tecmint/.ssh'.
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Press enter key]
Your identification has been saved in /home/tecmint/.ssh/id_rsa.
Your public key has been saved in /home/tecmint/.ssh/id_rsa.pub.
The key fingerprint is:
af:bc:25:72:d4:04:65:d9:5d:11:f0:eb:1d:89:50:4c tecmint@tecmint.com
The key's randomart image is:
+--[ RSA 2048]----+
| ..oooE.++|
| o. o.o |
| .. . |
| o . . o|
| S . . + |
| . . . o|
| . o o ..|
| + + |
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
2 of 26 Monday 01 September 2014 11:11 AM
Bio Latest Posts
| +. |
+-----------------+
Step 2: Create .ssh Directory on 192.168.1.2
Use SSH from server 192.168.1.1 to connect server 192.168.1.2 using sheena as
user and create .ssh directory under it, using following command.
[tecmint@tecmint ~]$ ssh sheena@192.168.1.2 mkdir -p .ssh
The authenticity of host '192.168.1.2 (192.168.1.2)' can't be established.
RSA key fingerprint is d6:53:94:43:b3:cf:d7:e2:b0:0d:50:7b:17:32:29:2a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.2' (RSA) to the list of known hosts.
sheena@192.168.1.2's password: [Enter Your Password Here]
Step 3: Upload Generated Public Keys to 192.168.1.2
Use SSH from server 192.168.1.1 and upload new generated public key
(id_rsa.pub) on server 192.168.1.2 under sheenas .ssh directory as a le name
authorized_keys.
[tecmint@tecmint ~]$ cat .ssh/id_rsa.pub | ssh sheena@192.168.1.2 'cat >> .ssh/authorized_keys'
sheena@192.168.1.2's password: [Enter Your Password Here]
Step 4: Set Permissions on 192.168.1.2
Due to dierent SSH versions on servers, we need to set permissions on .ssh
directory and authorized_keys le.
[tecmint@tecmint ~]$ ssh sheena@192.168.1.2 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
sheena@192.168.1.2's password: [Enter Your Password Here]
Step 5: Login from 192.168.1.1 to 192.168.1.2 Server without
Password
From now onwards you can log into 192.168.1.2 as sheena user from server
192.168.1.1 as tecmint user without password.
[tecmint@tecmint ~]$ ssh sheena@192.168.1.2
Ravi Saive
Owner at TecMint.com
Simple Word a Computer Geek and Linux Guru who loves to share
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
3 of 26 Monday 01 September 2014 11:11 AM
tricks and tips on Internet. Most Of My Servers runs on Open
Source Platform called Linux.
Linux Services & Free WordPress
Setup
Our post is simply DIY aka Do It Yourself, still you may nd diiculties and
want us to help you out. We oer wide range of Linux and Web Hosting
Solutions at fair minimum rates. Please submit your orders by Clicking Here.
Tweet Tweet
5
36
Like Like
10
63
comments
Previous Post
Install VLC (Media Player) in RHEL/CentOS 6.3/5.6, Fedora 17-12
Next Post
Install Razor Qt 0.5.0 (A Lightweight Desktop Environment) in RHEL/CentOS 6,
4
Share Share
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
4 of 26 Monday 01 September 2014 11:11 AM
Fedora 17,16
Related Post(s):
Mytop (MySQL Database Monitoring) in RHEL/CentOS 6.3/5.6 and Fedora
17/12
1.
Protect PHP Installation with Suhosin Security Patch in RHEL / CentOS /
Fedora
2.
20 Linux YUM (Yellowdog Updater, Modied) Commands for Package
Management
3.
Install CongServer Security & Firewall (CSF) in RHEL,CentOS & Fedora 4.
Install RHEL/CentOS 7.0 on Multiple Servers using FTP Network Source 5.
Install NetBeans IDE 7.2 in RHEL/CentOS 6.3/5.8 and Fedora 18-12 6.
63 Responses
Oleksiy says:
October 18, 2012 at 1:47 pm
For Debian only 3 steps :)
1) Generate ssh keys.
2) Run ssh-copy-id (copy your ssh public key ) to remote host
3) login to remote host using ssh keys.
Reply
1.
ahmed says:
December 26, 2012 at 4:08 pm
Greet Thanks for you sir
you saved my hadoop Way :D
Reply
2.
Alexander says:
February 11, 2013 at 8:13 pm
I dont do this with Fedora and Ubuntu GNU/Linux System. Ubuntu to Fedora
is great, but trying with Fedora to Ubuntu, no function. I need help. Please.
Thanks.
Reply
3.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
5 of 26 Monday 01 September 2014 11:11 AM
Ravi Saive says:
February 11, 2013 at 8:27 pm
Can you tell exactly what errors you getting or you could post them here.
so we could work out and give you a way to communicate your fedora to
Ubuntu system.
Reply
intel_chris says:
April 18, 2013 at 2:48 pm
Most of the time this works great for me, which is important because as part
of an automated test environment I have scripts that need to send root
commands to other systems on their LANs with ssh and if the target system
prompts for a password the script fails. However, I have a Fedora 16 system
that refused to honor the authorized_keys le in roots ~/.ssh and prompts for
a password anyway. I dont know what is causing it to do that, when the other
Linux boxes all work ne (and the Fedora box works ne for non-root use
logins). Note, the system does let me ssh login as root, because I can enter the
pasword, but not the script.
Reply
4.
Sevior Austria says:
April 30, 2013 at 6:03 pm
this didnt work for me :(
Mine are 2 CentOS 5.8 servers, but I dont know why this didnt work. Can
someone help out?
Reply
Ravi Saive says:
April 30, 2013 at 8:24 pm
You followed all steps correctly? while logging you getting password
prompt?
Reply
Jake says:
5.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
6 of 26 Monday 01 September 2014 11:11 AM
July 26, 2013 at 9:22 am
I followed all steps to the letter but I still have to enter the
password.
Reply
Jake says:
July 26, 2013 at 9:28 am
Never mind. I deleted the relevant .ssh dirs local and remote, then
tried again. Now its working.
Thanks for the tutorial.
Reply
Randy says:
September 3, 2013 at 3:44 am
CentOS has a command ssh-copy-id that helps out. Theres a
guide here that shows it http://www.howtoforge.com/how-to-
congure-ssh-keys-authentication-with-putty-and-linux-server-
in-5-quick-steps
Reply
Zolzaya says:
May 7, 2013 at 3:38 pm
one-to-one connection without passwordless was successfully. But one-to-two
connection was failed, rst one is successful, second one is not login without
password. help me??
Reply
Ravi Saive says:
May 7, 2013 at 4:33 pm
Yes! you must copy key and create authroized_keys le on that server.
Reply
6.
Zolzaya says:
May 7, 2013 at 3:40 pm
7.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
7 of 26 Monday 01 September 2014 11:11 AM
In my opinion, our created id_rsa.pub key at host node copy to other two
nodess home directory. then create authuorized_keys on other two site. Is it
true?
Reply
Sayantani says:
May 27, 2013 at 2:28 pm
It was really a great help indeed. Thank u so much.. it served my purpose.
Reply
8.
Prince says:
July 15, 2013 at 1:32 pm
Hi,
i have a problem of moving data from Hue to HDFS.
may you please guide me on how do i do about that.
Thanks
Reply
9.
Arvind says:
July 16, 2013 at 12:39 pm
Hi,
I followed above steps but still not able to connect to my server without
password.
i am using
server 1 : Red Hat Enterprise Linux Server release 5.5
server 2 : Red Hat Enterprise Linux Server release 6.2
i want to connect from server one to two without password.
please help.
Thanks and Regards,
Arivnd.S
Reply
10.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
8 of 26 Monday 01 September 2014 11:11 AM
Ravi Saive says:
July 16, 2013 at 1:36 pm
Login into server1 and run the following commands.
ssh-keygen -t rsa
ssh user@server2 mkdir -p .ssh
cat .ssh/id_rsa.pub | ssh user@server2 'cat >> .ssh/authorized_keys'
ssh user@server2 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
Now try to login to server2, it will wont prompt you to enter password.
Try and let me know.
ssh user@server2
Thanks..
Reply
Arvind says:
July 16, 2013 at 3:47 pm
Followed above instruction.
still not able to connect to my server without password.
there was no error while following above steps.
do i need to check any specic log for messages?
Thanks
Reply
Ravi Saive says:
July 16, 2013 at 4:09 pm
Ok, but is this asking password prompt?
Reply
Mithilesh says:
January 13, 2014 at 5:45 pm
It is asking password for me. place of user i am using root user.
Thanks,,
Reply
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
9 of 26 Monday 01 September 2014 11:11 AM
KC says:
April 4, 2014 at 8:52 pm
PAM may be blocking you from logging in as root remotely. Try
it with a mere mortal user (not root) and verify it works okay. If
it does, then look more at /etc/pam.d/sshd and similar les on
the target host.
Reply
octopus-gamma says:
July 22, 2013 at 6:16 am
Hello. Here are some preliminary system specs:
Local: Fedora 18 (Desktop Interface)
Server: Ubuntu 12
Setting up password-less ssh works ne from Ubuntu system to Ubuntu
Server. From Fedora, not so much. The copy-id command works, and
initially requests the password to fulll the request. From Fedora, I ssh into
my Ubuntu server and it still prompts for a password. Is there something
dierent in sshd or elsewhere that we should be reviewing?
Troubleshooting:
I rebooted both devices to ensure that all services restart, and also veried
that the services were running upon reboot.
Any information on this would be most helpful. Thank you.
Reply
11.
Powerball says:
August 8, 2013 at 12:49 am
A great tip, thanks. Used with mySQL in order to dump and load a database
from one server to another. See here:
ssh -C user@host mysqldump -u dbuser password=dbpass -D dbname | gzip
| gzip -d | mysql -u dbuser password=dbpass -D dbname
Thanks, again!
Reply
12.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
10 of 26 Monday 01 September 2014 11:11 AM
Raja says:
August 20, 2013 at 11:23 am
I followed the above steps which mentioned by you. But still when i try to do
ssh, its asking for password. can you pls let me know is there anything i have
to do. i am trying to login from fedora 18 to fedore 11. please guide
Reply
Ravi Saive says:
August 20, 2013 at 12:16 pm
Have you uploaded Generated Public Key to remote server under
authorized_keys le?. Please check content of authorized_keys le.
Reply
13.
ravindra says:
August 22, 2013 at 6:28 pm
insted of rsa we can use dsa also
dsa is the new one
Reply
Ravi Saive says:
August 22, 2013 at 10:04 pm
Yes you can use any one of them.. both are almost same with minor
changes.
Reply
14.
Hary says:
September 10, 2013 at 3:35 pm
Many thanx for your brilliant steps.. :))
Reply
15.
jyoti says:
September 11, 2013 at 6:41 pm
16.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
11 of 26 Monday 01 September 2014 11:11 AM
i tried the same approach i was able to login from one env to another but
while trying to re sudo su Command its still asking for password :(
Reply
waqas says:
October 8, 2013 at 7:47 pm
my server is down when i want to login through putty using ssh it gives error
connection time out now i want o work on my server how can i login
through putty to work on it
Reply
17.
A says:
October 15, 2013 at 1:51 am
How will this script function incase I use RSA securID to log in to the servers?
Reply
18.
sushant says:
October 22, 2013 at 9:44 pm
Awesome. Its perfectly working. :)
Reply
19.
chandresh says:
October 23, 2013 at 9:59 pm
hi can u help me.
in my fedora 19 system on gui base the sftp not working but on terminal when
i login to sftp it is working ne can u give me the solution of this error.
Reply
20.
E.Mata says:
October 30, 2013 at 9:09 am
how would it work if the account (1) is being used in a SCP command as scp
le act1@home machine where acct 1 is not dened to where the SCP
command is running ( remote machine ?
21.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
12 of 26 Monday 01 September 2014 11:11 AM
Example:
Unix 2 uses acct2 has its home env and executes the scp le
acct1@localmachine where acc1 is dened.
Does an authorized_keys le into the .ssh directory of acct1 needed?
Reply
Eddie G. says:
November 2, 2013 at 10:55 am
I think a lot of problems with the two-way connection between Fedora might
be an SELinux issue?..just throwing that one out there!.and thanks for the
articlevery educational!!
Reply
22.
Drew says:
December 7, 2013 at 3:08 am
Seems I have a permission error when trying to create the .ssh directory.
Could you help?
Could not chdir to home directory /var/services/homes/Inspections: Permission
denied
mkdir: cant create directory .ssh: Permission denied
Reply
Ravi Saive says:
December 7, 2013 at 3:28 pm
Why you creating under /var directory, it should be under users home
directory (i.e. /home).
Reply
Drew says:
December 9, 2013 at 10:04 pm
Yes I re-did all the steps and it has worked. I have one more
question. I have a second server Id like to add to authorized_keys
Can you tell me the proper syntax to append the le for Step 3
23.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
13 of 26 Monday 01 September 2014 11:11 AM
above so that both servers can login?
Reply
Ravi Saive says:
December 10, 2013 at 2:14 pm
Simply upload the id_rsa.pub key on second servers under
/home/user/.ssh/authorized_keys
Reply
Vivek says:
December 27, 2013 at 10:05 am
Its great..!
Reply
24.
sangeetha says:
January 7, 2014 at 7:56 pm
I was enabling ssh passwordless login sun solaris server. I followed all the
steps above.
But it still prompting for password.
I tried to debug. Here is the debug output.
ssh -v oracle@192.6.14.41
Sun_SSH_1.1.3, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
debug1: Reading conguration data /etc/ssh/ssh_cong
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to 192.6.14.41 [192.6.14.41] port 22.
debug1: Connection established.
debug1: identity le /appbin/oracle/uccdev/.ssh/identity type -1
debug1: identity le /appbin/oracle/uccdev/.ssh/id_rsa type 1
debug1: identity le /appbin/oracle/uccdev/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version Sun_SSH_1.1.3
debug1: match: Sun_SSH_1.1.3 pat Sun_SSH_1.1.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-Sun_SSH_1.1.3
debug1: use_engine is yes
debug1: pkcs11 engine initialized, now setting it as default for RSA, DSA, and
symmetric ciphers
25.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
14 of 26 Monday 01 September 2014 11:11 AM
debug1: pkcs11 engine initialization complete
debug1: Failed to acquire GSS-API credentials for any mechanisms (No
credentials were supplied, or the credentials were unavailable or inaccessible
Unknown code 0
)
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: Peer sent proposed langtags, ctos: i-default
debug1: Peer sent proposed langtags, stoc: i-default
debug1: We proposed langtags, ctos: i-default
debug1: We proposed langtags, stoc: i-default
debug1: Negotiated lang: i-default
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: Remote: Negotiated main locale: C
debug1: Remote: Negotiated messages locale: C
debug1: dh_gen_key: priv key bits set: 125/256
debug1: bits set: 1628/3191
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 192.6.14.41 is known and matches the RSA host key.
debug1: Found key in /appbin/oracle/uccdev/.ssh/known_hosts:1
debug1: bits set: 1563/3191
debug1: ssh_rsa_verify: signature correct
debug1: newkeys: mode 1
debug1: set_newkeys: setting new keys for out mode
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: set_newkeys: setting new keys for in mode
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: Authentications that can continue: gssapi-keyex,gssapi-
with-mic,publickey,password,keyboard-interactive
debug1: Next authentication method: gssapi-keyex
debug1: Next authentication method: gssapi-with-mic
debug1: Failed to acquire GSS-API credentials for any mechanisms (No
credentials were supplied, or the credentials were unavailable or inaccessible
Unknown code 0
)
debug1: Next authentication method: publickey
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
15 of 26 Monday 01 September 2014 11:11 AM
debug1: Trying private key: /appbin/oracle/uccdev/.ssh/identity
debug1: Trying public key: /appbin/oracle/uccdev/.ssh/id_rsa
debug1: Authentications that can continue: gssapi-keyex,gssapi-
with-mic,publickey,password,keyboard-interactive
debug1: Trying public key: /appbin/oracle/uccdev/.ssh/id_dsa
debug1: Authentications that can continue: gssapi-keyex,gssapi-
with-mic,publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
Password:
Can you please help me out?
Reply
Juan says:
January 30, 2014 at 5:41 am
Ravi,
Followed your steps, one by one without error, and still it is asking for
password.
Local machine:
$ uname -a
Linux xxxxx 2.6.18-164.2.1.el5 #1 SMP Mon Sep 21 04:37:42 EDT 2009
x86_64 x86_64 x86_64 GNU/Linux
Remote machine:
$ uname -a
Linux yyyyyy 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64
x86_64 x86_64 GNU/Linux
Reply
26.
Jagan says:
March 23, 2014 at 11:59 pm
hi ,
I followed the above steps but unable to connect without pasword. my os is
cento 6.5there is use root instead of user on both users. i think this is not
a big mistake.. #scp id_rsa.pub root@xxxx..x.xxxxx.. but i am not able to get
inCould you please help me out

Thanks
Jagan
27.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
16 of 26 Monday 01 September 2014 11:11 AM
Reply
sugatant itlog says:
April 13, 2014 at 12:35 am
Thank you and it work perfectly. But I think those that got problems using this
guidelines was because of SELinux. Cause I experienced the same following
this guide in a centos/rhel environment.
Just do the either of the below commands and afterwards you should be able
to ssh without asking for password.
[root@centossrv1 ~]# ssh root@tester1 restorecon -R /root/
root@tester1s password:
or
[root@tester1 ~]# restorecon -R /root/
Again, thank you tecmint and more power!
Reply
sugatant itlog says:
April 13, 2014 at 12:44 am
[root@centossrv1 ~]# cat .ssh/id_rsa.pub | ssh root@tester1 cat >>
.ssh/authorized_keys
root@tester1s password:
[root@centossrv1 ~]# ssh root@tester1 chmod 700 .ssh; chmod 640
.ssh/authorized_keys; chmod go-rwx .ssh/authorized_keys
root@tester1s password:
Well, this was I did. in my case.
Thanks again!
Reply
bigdog says:
June 14, 2014 at 12:21 am
I was stuck and this step denitely helped. Thank you.
Reply
28.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
17 of 26 Monday 01 September 2014 11:11 AM
Meszias says:
April 16, 2014 at 10:35 pm
I havent realized about the chmod on path and on the le
Reply
29.
srikanth says:
May 5, 2014 at 1:52 pm
I followed up all the steps and got no error whatsoever. But it still doesnt
work. Any ideas?
Tnx
Reply
30.
kumaravel says:
May 13, 2014 at 8:14 pm
I have followed the steps given
But I think there is a problem with the user I am trying to login with because
of which passwordless ssh is NOT working
Reply
31.
Vin says:
May 15, 2014 at 12:26 am
check the stickybit on the folder which contains .ssh folder, remove the
stickybit if it exists chmod g-s dirname
Reply
32.
Praveen says:
May 19, 2014 at 2:42 pm
Sir ,
I am using your following step, I am trying to login. which passwordless ssh is
NOT working.
Reply
33.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
18 of 26 Monday 01 September 2014 11:11 AM
Ravi Saive says:
May 19, 2014 at 4:30 pm
Have you correctly placed SSH key in remote server authorized le?
Reply
Shivaji says:
May 24, 2014 at 7:40 am
Thanks Ravi.Worked for me
Reply
Ravi Saive says:
May 24, 2014 at 12:07 pm
Welcome Bro, I a happy it worked for you..
Reply
34.
Vlad says:
June 6, 2014 at 1:45 am
I fought with this for a while and found that the permissions on the users
home directory needed to be updated from:
drwxrwxr-x
to:
drwxr-xr-x
by running the following as the user in the users home dir:
[user@host ~]# chmod 755 .
This xed it for me.
Reply
35.
Deepak Gupta says:
June 26, 2014 at 2:54 am
36.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
19 of 26 Monday 01 September 2014 11:11 AM
Absolutely love this post !! Thanks for sharing these steps.
Reply
dung says:
July 2, 2014 at 2:38 pm
work perfect for me!
ENV:
- client: GLSDK 6.04 for OMAP5 EVM reference board
- server: CentOS 5.5
Thanks!
Reply
37.
srikant says:
July 10, 2014 at 12:28 pm
Hi ,
I was able to successfully able to login to server 2 passwordlessly from server
1. But this is getting reset after a while( maybe after 24 hours) and again i
have to enter password. How to make this change permanent.
Reply
Ravi Saive says:
July 10, 2014 at 3:55 pm
No, it will not automatically reset itself, someone from you team might
doing it or some scripts might reset your ssh logins.
Reply
sugatang itlog says:
July 30, 2014 at 5:10 am
Or probably theres system conguration management (like chef, puppet,
ansible and the like) that governs (your infrastructure) the ssh
authorized_keys.
Reply
38.
Nick says: 39.
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
20 of 26 Monday 01 September 2014 11:11 AM
August 8, 2014 at 11:37 am
Hello Can you help me. While setting up ssh key i forgot to give 600
permission to authorized_keys le and now connection is closed please help
me with this, now how can i login to other server its always showing
connection closed by some ip. Please help
Reply
Anand says:
August 14, 2014 at 1:24 pm
Hello Ravi,
I followed your steps to do password-less ssh between two ubuntu systems,
the commands executed properly, not even single error but after everything
still it is asking password to connect.
** any dierent procedure for ubuntu OS???
Please help me out..
Reply
Ravi Saive says:
August 16, 2014 at 11:54 am
Procedure is same for all Linux OSs, but never yet tried on Ubuntu
systems, will try and let you know, why its still asking for password.
Reply
40.
Leave a Reply
Name (Required)
Mail (will not be published) (Required)
Website
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
21 of 26 Monday 01 September 2014 11:11 AM
Submit Comment
Twitter 1703 Twitter
Facebook 38814 Facebook
Google+ 6338 Google+
RSS 3656 Subscribers
Become A TecMint Subscriber to receive latest Updates.
Enter Your Email Address :) Signup!
Popular
Latest
Comments
Tags
How to Add Linux Host to Nagios Monitoring Server Using NRPE Plugin 208
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
22 of 26 Monday 01 September 2014 11:11 AM
Comments
Nagios 4.0.1 Released Install on RHEL/CentOS 6.x/5.x and Fedora 19/18/17
174 Comments
CentOS 6.4 Step by Step Installation Guide with Screenshots 169 Comments
Wine 1.6.2 Stable Released Install in RHEL, CentOS and Fedora 163
Comments
Install Apache 2.2.15, MySQL 5.5.34 & PHP 5.5.4 on RHEL/CentOS 6.4/5.9 &
Fedora 19-12 158 Comments
Google Chrome 35 Released Install on RHEL/CentOS 6 and Fedora 20-15
142 Comments
:: Advertise ::
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
23 of 26 Monday 01 September 2014 11:11 AM
:: Download Free Linux eBooks ::
Complete Linux Command Line Cheat Sheet
The GNU/Linux Advanced Administration Guide
Securing & Optimizing Linux Servers
Linux Patch Management: Keeping Linux Up To Date
Introduction to Linux A Hands on Guide
Understanding the Linux Virtual Memory Manager
Linux Bible Packed with Updates and Exercises
A Newbies Getting Started Guide to Linux
Linux from Scratch Create Your Own Linux OS
Linux Shell Scripting Cookbook, Second Edition
Securing & Optimizing Linux: The Hacking Solution
User Mode Linux Understanding and Administration
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
24 of 26 Monday 01 September 2014 11:11 AM
Know More
Submit Order
:: Follow Us ::
TecMint.com
google.com/+Tecmint
Tecmint: Linux Howtos, Tutorials & Guides
+ 6,932
Follow +1
:: About ::
TecMint.com is a website that publishes practical and useful out-of-the-box articles
for aspirant like you and me. We seek to present exceptional, remarkable tips,
tutorials, and resources that the modern web professional will appreciate.
:: Our Services ::
We oer wide range of Linux Web Hosting and Management Services
includes Linux hosting, WordPress hosting, Joomla Hosting, CMS hosting, Website
migration and Custom solutions, making us a one-stop destination for all your
possible hosting needs at fair minimum rates.
:: Advertise ::
TecMint.com is visited by tens of thousands of Linux users and has a
excellent reputation in the search engine ranking. Most of the traic comes from
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
25 of 26 Monday 01 September 2014 11:11 AM
Advertise Now
Google organic search (80%). Spread your messages or products to an engaged
readers by advertising with us.
This work is licensed under a (cc) BY-NC | TecMint uses cookies. By
using our services, you comply to use of our cookies. More info:
Privacy Policy.
2012-2014 All Rights Reserved.
10 Useful Free Linux eBooks for Newbies and Administrators
25 Hardening Security Tips for Linux Servers
60 Commands of Linux : A Guide from Newbies to System Administrator
15 Command Line Tools to Monitor Linux Performance
5 Best Practices to Secure and Protect SSH Server
18 Tar Command Examples in Linux
20 Linux YUM (Yellowdog Updater, Modied) Commands
25 Useful Basic Commands of APT-GET and APT-CACHE
20 Funny Commands of Linux or Linux is Fun in Terminal
35 Practical Examples of Linux Find Command
10 Linux Distributions and Their Targeted Users
SSH Passwordless Login Using SSH Keygen in 5 ... http://www.tecmint.com/ssh-passwordless-login-u...
26 of 26 Monday 01 September 2014 11:11 AM

You might also like