- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SSH Key based user level access problem.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 12:19 PM
02-20-2005 12:19 PM
SSH Key based user level access problem.
I'm currently struggling to get ssh password-less logins to work. I've 18 host machines that I need seamless access between all running HPUX 11.x with OpenSSH_3.7.1p2-pwexp26, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003
HP-UX_Secure_Shell-A.03.71.000, HP_UX Secure Shell versions.....
I've created a .ssh directory for every user that requires equivelent access, with 700 permisions and created the id_dsa.pub / id_dsa.
I've added all the key file from all hosts to the authorized_keys file and for 14 out of the 18, everything works. On the other machines, every time I ssh to the host, it askes me for a password!?
The Debug output is as follows:
debug1: Authentications that can continue: publickey,password,keyboard-interactve^M
debug2: we did not send a packet, disable method^M
Any ideas?!
Any help comments, tips, RTFM's etc warmly received as ever!!
Thanks,
-=ChaZ=-
- Tags:
- ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 01:14 PM
02-20-2005 01:14 PM
Re: SSH Key based user level access problem.
The very verbose debug output states:
debug2: we did not send a packet, disable method
just before it falls back to password based authentication, although on the working servers, this line is never seen in the logs.
Again any help, comments, suggestions greatfully received!
Cheers,
-=ChaZ=-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 01:27 PM
02-20-2005 01:27 PM
Re: SSH Key based user level access problem.
- ownership / permissions of user's home directory
- have target machines dsa hosts keys?
I could imagine there could be problems due to rsa/dsa mismatches.
Last last I bite my teeth out on this one I had accedentially called the file .ssh/authorized.keys instead of ..._...
Unfortunately, with this type of problem the -vv option doesn't help a lot, better check the target hosts' syslogs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 01:45 PM
02-20-2005 01:45 PM
Re: SSH Key based user level access problem.
Thanks for the tips, unfortunately I have no access to the syslog's on the servers in question, so no luck there....
The .ssh dir has 700 permissions and everything under it ix 755 apart from id_dsa. I've double checked the permissions to no avail.
The authorised_keys, bit me once, but this time all file names are correct!
Any more pointers warmly received!
Cheers,
ChaZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 02:10 PM
02-20-2005 02:10 PM
Re: SSH Key based user level access problem.
anyhow - see man ssh_config for dedicating a log file in the users homedir and more fancy logging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 02:41 PM
02-20-2005 02:41 PM
Re: SSH Key based user level access problem.
Other than permissions (which are all to spec) and the files, has anyone come across a similar situation? - I've googled and seen the same errors, but no fixes as yet....
Cheers,
ChaZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 02:46 PM
02-20-2005 02:46 PM
Re: SSH Key based user level access problem.
Any other ideas (please, starting to get desperate now!! ;-)
Cheers,
ChaZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 04:50 PM
02-20-2005 04:50 PM
Re: SSH Key based user level access problem.
sshd_config:
#PubkeyAuthentication yes
ensure this is set and done, if that were for some reason disabled You would search until the very end of time [*]
[*](that would be when Ry'leh comes back on earth, for the lovecraftian's among us)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 05:13 PM
02-20-2005 05:13 PM
Re: SSH Key based user level access problem.
Sounds like you have covered all the bases.
The output
"debug2: we did not send a packet, disable method" is the key to your problem.
Unfortuntaely its fairly generic. This message could indicate:
- no entry in "authorized_keys" file
- incorrect entry in "authorized_keys file
I'd also check the following parameter in sshd_config.
PubkeyAuthentication yes
If its set to no, you'll also get this message.
Don't know if this will help but worth a try.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 05:31 PM
02-20-2005 05:31 PM
Re: SSH Key based user level access problem.
Con: Thanks for the confirmations, I'm sure everything is fine, all configs / permissions / server & client options in the conf files are the same! The *only* difference between the remote hosts that work and the ones that don't are the inetd.sec files. Although inetd.sec has no port 22 defined, maybe there is a generic rule that is messing things up.....
Incidently, the sshd_config's on all machines don't include the line to explicitly allow host/key based authentication although the some of them work....
Very strange!?!
Any other pointers / suggestions / comments warmly received as ever!!
Thanks for the help so far,
-=ChaZ=-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 06:10 PM
02-20-2005 06:10 PM
Re: SSH Key based user level access problem.
If that publickey line is missing and You don't have root access, kindly ask the root person to set it for debugging. As this represents an increase in security, he could hardly be against it :)
also, cksum the authorized_keys files maybe there's a line wrap in there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 07:35 PM
02-20-2005 07:35 PM
Re: SSH Key based user level access problem.
I've tried re-creating the pub / host keys again too, still no joy. I've generated rsa and dsa keys but again nothing good to report.....
The error implies that the client is not doing or getting something, although if I use the same client (server) I can ssh as other users to the working machines......
If anyone else has anything else to offer, I'd really appreciate it!!! - Having sold ssh as the answer to our prayers, it's starting to get on my nerves now.....
Thanks again,
ChaZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 09:18 PM
02-20-2005 09:18 PM
Re: SSH Key based user level access problem.
It kind of smells like it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2005 10:18 PM
02-20-2005 10:18 PM
Re: SSH Key based user level access problem.
#AuthorizedKeysFile .ssh/authorized_keys
If is is uncommented and set to anything OTHER than .ssh/authorized_keys, I think that could explain it (or it could be 1 of 256 other things :o/)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2005 01:32 PM
02-21-2005 01:32 PM
Re: SSH Key based user level access problem.
if anyone can assist with deciphering the logs and pointing me towards a fix I would be eternally greatful (and will consider spell checking further posts ;-)
Thanks again for the help so far!!!!!
-=ChaZ=-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2005 01:33 PM
02-21-2005 01:33 PM
Re: SSH Key based user level access problem.
Thanks!
-=ChaZ=-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2005 04:17 PM
02-21-2005 04:17 PM
Re: SSH Key based user level access problem.
Perplexing problem you have!
Don't want to repeat what you've said but can I confirm your problem as follows:
Client A (user "gnsadm") can connect to "gnsadm" user account on "neutron" using Publickey authentication. Client B (User "gnsadm") cannot connect to "gnsadm" user account on "neutron" with publickey authentication and is prompted for password.
From the log files it appears very much to be a problem with the public key entry in the authorized_keys file. It appears publickey is a recognised authentication method but the server is not recognising the public key thats been sent.
Perhaps its worth comparing the sshd log on the server for a client connecton that succeeded and one that failed.
Don't know if you have it but have attached a doco on HP-SSH. Might be useful.
http://newfdawg.com/docs/HP-SSH_Explained.PDF
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2005 04:41 PM
02-21-2005 04:41 PM
Re: SSH Key based user level access problem.
Yes as you deduced, the scenario is exactly as you state. The log file does look like it's having a problem with the id_dsa.pub key although I've check all permissions and even run the server side configuration on another port so that I can check the logging (I have no root access to the neutron side....) but all to no avail. I removed all of the users'd id's and regenerated them, but still get the same connection problem. I'm at a total loss now...
I've read and re-read all the documents I've found and can see nothing wrong at all.
I'm going to try creating another set of ID's of both rsa and dsa flavours to see if that gives any different errors.
I'll update as soon as I've something to report!!!
Thanks again for the support (I was a bit shocked to see a *cough* hostname appear, I guess both my sed and spelling skills have also left me.... ;-)
Cheers,
-=ChaZ=-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2005 07:45 PM
02-21-2005 07:45 PM
Re: SSH Key based user level access problem.
Check to have 700 on .ssh , owner and group to be your user/group or start with a rm -rf .ssh
Check also the parent directory ( /home/user ) -> 755
It's better to first create the key ( ssh-keygen -t dsa ). This will create .ssh for you
On remote, same steps. ( ssh-keygen -t dsa is not needed but it doesn't hurt )
Then transfer the public key id_pub.dsa to remote host and :
cat id_dsa.pub >> ~/.ssh/authorized_keys2
Make sure you don't have 2 keys ( in .ssh/authorized_keys2 ) for the same host
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 01:29 AM
02-22-2005 01:29 AM
Re: SSH Key based user level access problem.
I had a similar problem about a year ago and it turned out to be an issue with the non hp (meaning it wasn't from an hp depot) version of ssh and my trusted systems.
Once trusted was turned off it worked correctly, the fix we used was to install the hp .depot version of ssh and all was well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 03:56 PM
02-22-2005 03:56 PM
Re: SSH Key based user level access problem.
There are a few other interesting things to consider, the suggestion of installation method is interesting, I'm not sure if the sshd (although it's an HP release) was installed via a depot, so I'll confirm. All of the host systems are trusted, but some work as expected and the other's don't so I'm not sure if this is a factor.
I have also spotted the RNG package on working systems so will compare against the non-workers to see if it's missing.
Thanks again for everyones help / tips / info, this is turning into quite a monster thread!!! - When I get it fixed, I'll post the complete solution although I just hope it's nothing as trivial as directory permissions!!!!
Any further comments / tip / suggestions warmly received as ever!!!
Cheers,
-=ChaZ=-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 06:52 PM
02-22-2005 06:52 PM
Re: SSH Key based user level access problem.
After what seems like an eternity of wrong, I've managed to get it going with all of your help!!
A big thanks for everyone's suggestions and reading materials!
Ok: The problem was 2 fold (I'm not sure which one fixed the issue)
1: The RNG kernel based random number generator was not installed on the problem machines. (unlikley to have resolved the problems as it's only used to seed the id's) although new id's created after installation did eventually work...
2: The sshd sw was part of an ignite image on the 'broken' servers, re-installed from depots.
Created new dsa id_dsa.pub's with the new sw, swapped keys in the usual fashion, everything worked!
Thanks again for the support!
-=ChaZ=-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2005 06:35 PM
02-23-2005 06:35 PM
Re: SSH Key based user level access problem.
Thanks again,
-=ChaZ=-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2006 02:49 PM
02-28-2006 02:49 PM
Re: SSH Key based user level access problem.
I know that this thread was closed long time back,but I need a help from you.I am not able to make a passwordless secure connection to a HP_UX m/c.The debug logs are same as yours.Password prompt is coming up whenever I try to connect to HP_UX. Can you please tell me the steps that you did to resolve this issue?
Thanks in advance,
Anju