1846556 Members
1605 Online
110256 Solutions
New Discussion

SSH not working

 
Dary
Frequent Advisor

SSH not working

Hi All,

I am trying to setup ssh between two hpux 11.23, but it keep asking for password. here is the steps I took; So, what am I missing?

In Short
________________________________________

1. System1: $ ssh-keygen –t dsa
2. Creates a file in $HOME/.ssh called "id_rsa.pub"
3. Copy this file to the target machine ("System2") to $HOME/.ssh/ as "authorized_keys2"
4. Repeat the steps mentioned above but with reversed setup,
5. "ssh-keygen" on System2, copy the file ~/.ssh/id_rsa.pub to
6. System1 into ~/.ssh/ as "authorized_keys2"
7. Create a file called 'config' in $HOME/.ssh with these two lines in them.
o CheckHostIP no
StrictHostKeyChecking no
8. ssh from each system to the other system without being asked for a password.


HERE is the error msg I am getting.

Permission denied (publickey,password,keyboard-interactive,hostbased).

Thanks;
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: SSH not working

Shalom,

Check the ownership of the home directory and the .ssh folder.

If its not the user it won't work.

Check the permissions on the files in .ssh

Here are good permissions and ownership for the root user.

-rw-r--r-- 1 root root 1221 Feb 20 06:30 authorzed_keys
-rw------- 1 root root 668 Feb 14 20:35 id_dsa
-rw-r--r-- 1 root root 616 Feb 14 20:35 id_dsa.pub
-rw-r--r-- 1 root root 2484 Jul 6 22:24 known_hosts

Home directory and .ssh folder are also owned by root.

Check the syslog.log for further cryptic clues.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven Schweda
Honored Contributor

Re: SSH not working

> HERE is the error msg I am getting.
> [...]

It might help to see what you did to get
this error message. A transcript showing
actual "ssh -v [...]" output would be even
better.


There are dozens of SSH problem threads in
this forum. Many of them could suggest an
answer to your problem.
Tingli
Esteemed Contributor

Re: SSH not working

Check server file /var/adm/syslog/syslog.log to see whether there is any message.
Mel Burslan
Honored Contributor

Re: SSH not working

make sure ~/.ssh has no looser than 700 permission and ~/.ssh/authorized_keys no looser than 600 and make sure they are owned by the user and preferably by their default group.

ssh is very finicky about file ownerships and permission and rightfully so as its main purpose is secure, un-spoofable communications.
________________________________
UNIX because I majored in cryptology...
Tingli
Esteemed Contributor

Re: SSH not working

Also, the home directory shouldn't be higher than 755.