We help IT Professionals succeed at work.

SSH with no password problem

mehranalmasi
mehranalmasi asked
on
Medium Priority
250 Views
Last Modified: 2010-03-18
Hi,
This question has been asked many times but non of the solutions seems to fix my problem.

On pc-a I (windows xp running Cygwin) I generated ssh keys and copied to pc-b (RHEL). I wal able to ssh to pc-b from pc-a with no problem.
Later I had to fix an NSF problem by changing user and goup ID of the user on pc-b. I also changed the rights to user dir.
all this broke the ssh set up. So I did all original steps to create no passwd ssh connection. However it would not work this time. I made sure there is no group write privilege for group on /home/user/.ssh path. I chmod .ssh to 700 and known_hosts to 600, user and group both set to user's for testing and none works.
This problem is duplicated for two redhat machines exactly the same way with none of the fixes working for any of them.

what else should I be looking at?

thanks in advance.
Comment
Watch Question

Commented:
Are you able to log in to the machine with this same username and using password?
Dushan De SilvaTechnology Architect

Commented:
Please check firewall, ports are correctly opened.

BR Dushan
system administrator
Top Expert 2007
Commented:
Run 'sshd -ddd' on RHEL, it will run in foreground in debug mode, then try to connect from pc-a.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Top Expert 2006
Commented:
Firstly check connectivity:

telnet hostname 22

[spud@bigserver spud]# telnet 192.168.1.101 22
Trying 192.168.1.101...
Connected to 192.168.1.101 (192.168.1.101).
Escape character is '^]'.
SSH-1.99-OpenSSH_3.9p1

Telnetting confirms that the port (ssh port 22) is correctly accessable and confirms that ssh is runing on it.

Next try and connect in verbose mode so that you get loads of useful info as to where the fault is:

ssh -vv 192.168.1.101

The -vv gives shed loads of information from the client side, and you'll see exactly at what point the connection fails or is rejected.

Finally, I always recommend this article if you need to go back to basics:

http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/

HTH:)




Commented:
There are several reasons for this to happen, I had the same problem and I fixed it.

first , though, write here the errors reported in /var/log/secure whenever you try to connect.

if you get a permission denied error, try changing your sshd_config file to include the following:
#
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys
#
also, you might want to copy the key file in your /etc/ssh/ssh_known_hosts file
root@host# cat yourkey.file >> /etc/ssh/ssh_known_hosts
root@host# service sshd restart
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.