Visit Our UNIX and Linux User Community


[Solved] passwordless SSH not working in one direction


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [Solved] passwordless SSH not working in one direction
# 1  
Old 02-23-2011
[Solved] passwordless SSH not working in one direction

Hi,

I am trying to remove the password requirement when connecting with SSH.

I have 1 server with Solaris 10 and 1 server with Solaris 9.

I have created both keys on both servers, copied public key to the other server and created a file auithorixed_keys on both.

I can successfully connect from the Solaris 9 server to the Solaris 10 server without password but I CANNOT connect to the Solairs 9 from the 10........

Desperately need this, anyone got any thoughts?

I have checked permissions on all files and I did exactly the same process on both servers
# 2  
Old 02-23-2011
the .ssh directory must be 700, the login (or home directory) must be 755 or more restrictive.
This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 02-23-2011
Solairs 9 Home directory is 777 and I can't change that

Solaris 10 home directory is more restrcited but I can't change that either

Both SSH directories are at 700

I am using "authorized_keys2" files - should these be "authorized_keys", i am wondering if solaris 10 is using the new er protocol...!??!?!

---------- Post updated at 07:39 AM ---------- Previous update was at 06:54 AM ----------

one question...

should I create the keys etc as the user I normally use, or as root?!

I haven't tried it as root.

I did noticed RSAAuthentication is set to Yes in sshd_config, i tried adding DSAAuthentication as that is what I am using (i tried rsa without any success)...it didn't make a different so I deleted it.

really stuck here, need to submit commands automatically by tonight or i am scuppered.
# 4  
Old 02-23-2011
Quote:
Originally Posted by mcclunyboy
Solairs 9 Home directory is 777 and I can't change that
To be honest i can't believe a home directory would be world-writable. If really so: have your sysadmin tarred, feathered, dismembered, hanged, fired and then really hurt. Still, i do not think that this is the key problem here.

Quote:
Originally Posted by mcclunyboy
am using "authorized_keys2" files - should these be "authorized_keys", i am wondering if solaris 10 is using the newer protocol...!??!?!
This might very well be the case. As ssh is downwards compatible, but not upwards, it would explain why you can initiate communication from on side and not from the other.

An output of ssh -vvvvv <youruser@yourhost> might help to analyze the problem. An output of cat /etc/sshd_config might help too.


Quote:
Originally Posted by mcclunyboy
should I create the keys etc as the user I normally use, or as root?!
Definitely as the user in question.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 5  
Old 02-23-2011
right i got it working, permissions on home folder after all.

i didn't want to change it as officially it isn't my server. however i didnt have a choice.

Home folder permissions set to 755 and I can connect with password...

Moderator's Comments:
Mod Comment edit by bakunin: edited the thread title to something more meaningful. Thank you for writing a follow-up.

Previous Thread | Next Thread
Test Your Knowledge in Computers #225
Difficulty: Easy
In September 2019, according to NetMarketShare, Google commanded over 90% market share for desktop search engines.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

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... (3 Replies)
Discussion started by: Thala
3 Replies

2. Shell Programming and Scripting

Ssh passwordless authentication

Hey team I have to enable password less authentication betweeen A to B server and A to C server and A to D server. For this I generated a ssh key on server A using ssh-keygen command and copied the key using ssh-copy-id command to B, C and D server. Everything is working fine as of now but... (5 Replies)
Discussion started by: Sandeep_sandy
5 Replies

3. UNIX for Dummies Questions & Answers

[Solved] Passwordless authentication lost between cluster nodes

after copying the public key then also the passwordless authentication is not working Best regards, Vishal (2 Replies)
Discussion started by: Vishal_dba
2 Replies

4. Solaris

[solved] Ssh passwordless login not working

This is Solaris 10 and sorce+destination are non root user. Somehow it is broke and I am not able to fix it. Already checked permissions on both servers and authorized_keys entry of destination is same as id_rsa.pub of source server. I can not regenerate keys on source server because I do not know,... (0 Replies)
Discussion started by: solaris_1977
0 Replies

5. UNIX for Advanced & Expert Users

Passwordless ssh

Hi I have created a user on a linux server and created a passwordless ssh key. I've echoed the key into the authorized_keys file for the user. I've added a series of forced commands to the key. From my laptop - logged in as myself - I can ssh into the server as that user and the commands... (3 Replies)
Discussion started by: steadyonabix
3 Replies

6. Shell Programming and Scripting

passwordless ssh

My main concern is, i have to login into 300 linux server and all are having same userid and password. I dont want to create any key for each server to login . Is there a way to run the shell script ? (3 Replies)
Discussion started by: Mani2512
3 Replies

7. UNIX for Dummies Questions & Answers

passwordless ssh

hi, i have tried with passwordless shh in google.. i followed the below steps ... user:~> ssh-keygen -t rsa Enter file in which to save the key (/home/cantin/.ssh/id_rsa):key.txt Enter passphrase (empty for no passphrase): Enter same passphrase again: till this step i... (0 Replies)
Discussion started by: arunmanas
0 Replies

8. Shell Programming and Scripting

ssh passwordless

Hi, I want to login to a remote server and sftp files without password prompting. So, I created private-public key pair as follows: user1@server1.com .ssh]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/user1/.ssh/id_rsa): Enter... (7 Replies)
Discussion started by: dips_ag
7 Replies

9. HP-UX

Help on passwordless ssh...

Hi, Can someone help me on ssh-keygen usage...? I used ssh-keygen after which "id.pub" file was generated in system1's > .ssh directory... I copied the same into the remote system system2 > .ssh directory as "authorized_keys" file. Now i tried ssh connection from system 1 to system... (7 Replies)
Discussion started by: EmbedUX
7 Replies

10. AIX

Passwordless authentication via SSH

I am trying to implement passwordless authentication via ssh2. I have used the well documented technique of generating a key pair with a blank passphrase on my client machine, and installing the public key on the destination server (AIX 5.3) in the user's .ssh2 directory. I have used this technique... (1 Reply)
Discussion started by: RegX
1 Replies

Featured Tech Videos