Unix/Linux Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Passwordless ssh for different user

UNIX for Advanced & Expert Users


Tags
solved, ssh

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 1 Week Ago
Thala Thala is offline
Registered User
 
Join Date: Dec 2013
Last Activity: 19 May 2017, 8:48 AM EDT
Posts: 43
Thanks: 15
Thanked 1 Time in 1 Post
Passwordless ssh for different user

Hello Folks,

I lost touch in ssh key gen topics.

I am in need of ssh to a server without password, kindly help me in configuring.

I have two servers,
server1 with user name apha & server1 with user name beta.

I need to ssh to the server2 from server1 with respective users,
Manually i do like this:- apha@server1: ssh beta@server2 which can be login with only providing beta password.

Kindly let me know how to login without password.

PS: I have password for both user accounts

Thanks in Advance!

Last edited by rbatte1; 1 Week Ago at 06:26 AM.. Reason: Added ICODE tags
Sponsored Links
    #2  
Old Unix and Linux 1 Week Ago
Aia's Unix or Linux Image
Aia Aia is offline
Registered User
 
Join Date: May 2008
Last Activity: 27 May 2017, 9:15 PM EDT
Posts: 1,586
Thanks: 43
Thanked 602 Times in 566 Posts
In server1, as user alpha, create a ssh pair key

Code:
ssh-keygen -t rsa -b 4096 -N ''

That creates an id_rsa and id_rsa.pub files in ~/.ssh

Copy the content of id_rsa.pub into /home/alpha/.ssh/authorized_keys in server2

That's it for alpha.
Repeat the process as beta user.
The Following User Says Thank You to Aia For This Useful Post:
Thala (1 Week Ago)
Sponsored Links
    #3  
Old Unix and Linux 1 Week Ago
RavinderSingh13 RavinderSingh13 is online now Forum Advisor  
Registered User
 
Join Date: May 2013
Last Activity: 28 May 2017, 12:23 PM EDT
Location: Chennai
Posts: 2,477
Thanks: 552
Thanked 1,172 Times in 1,055 Posts
Hello Thala,

There are plenty of links available on google, following 2 of them may help you understanding this procedure.
SSH Passwordless Login Using SSH Keygen in 5 Easy Steps
SSH login without password

Thanks,
R. Singh
The Following User Says Thank You to RavinderSingh13 For This Useful Post:
Thala (1 Week Ago)
    #4  
Old Unix and Linux 1 Week Ago
Thala Thala is offline
Registered User
 
Join Date: Dec 2013
Last Activity: 19 May 2017, 8:48 AM EDT
Posts: 43
Thanks: 15
Thanked 1 Time in 1 Post
SOLVED!

ok it works now!

thanks Aia, - you only forgot to mention permission attributes required for ssh & .ssh/authorized_keys.

But Ravinder link made it work!
The Following User Says Thank You to Thala For This Useful Post:
Corona688 (4 Days Ago)
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Passwordless sftp using a different user than the runtime user mady135 Shell Programming and Scripting 4 05-25-2016 07:50 AM
Check whether user has passwordless setup ryandegreat25 Shell Programming and Scripting 2 09-03-2012 05:25 AM
passwordless entry using ssh from one user to a different user on the same server deshaipet AIX 3 08-20-2011 09:04 AM
su -m <user> passwordless? jacki Shell Programming and Scripting 4 03-25-2011 03:27 AM
passwordless ssh for non-root user??? rs6000er AIX 9 11-11-2010 03:06 PM



All times are GMT -4. The time now is 12:28 PM.