SSH with no password problem

Posted on 2006-04-05
Last Modified: 2010-03-18
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.
Question by:mehranalmasi
    LVL 16

    Expert Comment

    Are you able to log in to the machine with this same username and using password?
    LVL 17

    Expert Comment

    Please check firewall, ports are correctly opened.

    BR Dushan
    LVL 27

    Accepted Solution

    Run 'sshd -ddd' on RHEL, it will run in foreground in debug mode, then try to connect from pc-a.
    LVL 22

    Assisted Solution

    Firstly check connectivity:

    telnet hostname 22

    [spud@bigserver spud]# telnet 22
    Connected to (
    Escape character is '^]'.

    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

    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:


    LVL 1

    Expert Comment

    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

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now