- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ssh2 login without password
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
Discussions
Forums
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
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
тАО04-17-2005 08:29 PM
тАО04-17-2005 08:29 PM
I need to login from my client on HP-UX into server (also HP-UX) without providing password, using ssh2.
I've generated dsa and rsa keys using ssh-keygen on client, then I've created file authorized_keys in /.ssh/ on server, and have copied client's file id_dsa.pub to /.ssh/authorized_keys. As described in manual after that action I would be granted to server without promting password, but
I still get a promt to provide password.
What did I do wrong?
thanx
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2005 10:09 PM
тАО04-17-2005 10:09 PM
Re: ssh2 login without password
Try connecting with "ssh -v host". It may give you information about the problem. Also check the permissions on your .ssh directory and the files within. I've seen ssh not trust keys when the permissions are too loose.
Good luck,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2005 10:09 PM
тАО04-17-2005 10:09 PM
Re: ssh2 login without password
http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/
http://www.ifi.uio.no/in228/scripting/doc/ssh-no-password.html
Be sure you didn't miss something. Also check ssh configuraion file, sometimes authorized keys file is configured to be "authorized_keys2". I had this problem once, took a while to find.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 03:19 AM
тАО04-18-2005 03:19 AM
Re: ssh2 login without password
(server)$ ssh-keygen -t dsa -f id_dsa
(server)$ cat id_dsa.pub >> .ssh/authorized_keys
(server)$ scp id_dsa
(server)$ chmod 750 /home/
(server)$ chmod 700 /home/
(server)$ chmod 600 /home/
(client)$ cd /home/
(client)$ mv id_dsa .ssh/
(client)$ chmod 750 /home/
(client)$ chmod 700 /home/
(client)$ chmod 600 /home/
(client)$ ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 03:21 AM
тАО04-18-2005 03:21 AM
Re: ssh2 login without password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 04:59 PM
тАО04-18-2005 04:59 PM
Re: ssh2 login without password
I've read the given links, I did exactly the same things as described in these documents.
I did the same om another host with the same OS and same version of Secure Shell, everything worked perfect.
Dont know what to do...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 05:51 PM
тАО04-18-2005 05:51 PM
Re: ssh2 login without password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 06:13 PM
тАО04-18-2005 06:13 PM
Re: ssh2 login without password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 06:29 PM
тАО04-18-2005 06:29 PM
Re: ssh2 login without password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 06:31 PM
тАО04-18-2005 06:31 PM
Re: ssh2 login without password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 06:35 PM
тАО04-18-2005 06:35 PM
Re: ssh2 login without password
$OpenBSD: sshd_config,v 1.48 2002/02/19 02:50:59 deraadt Exp $
# This is the sshd server system-wide configuration file. See sshd(8)
# for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/ssh/bin
# The strategy used for options in the default sshd_config shipped with
# HP-UX Secure Shell is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
#Port 22
#
# WARNING: enabling protocol 1 will cause HP-UX Secure Shell vulnerable
# to security attacks. It is strongly recommended NOT to enable protocol 1.
# Use "2,1" to notify sshd to use version 2 and fall back to version 1 if
# version 2 is not available. The default is "2".
#
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::
# HostKey for protocol version 1
#HostKey /opt/ssh/etc/ssh_host_key
# HostKeys for protocol version 2
#HostKey /opt/ssh/etc/ssh_host_rsa_key
#HostKey /opt/ssh/etc/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 3600
#ServerKeyBits 768
# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 600
#PermitRootLogin yes
#StrictModes yes
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# rhosts authentication should not be used
#RhostsAuthentication no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# For this to work you will also need host keys in /opt/ssh/etc/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
# KerberosAuthentication automatically enabled if keyfile exists
#KerberosAuthentication yes
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# AFSTokenPassing automatically enabled if k_hasafs() is true
#AFSTokenPassing yes
# Kerberos TGT Passing only works with the AFS kaserver
#KerberosTgtPassing no
# Set this to 'yes' to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
#PAMAuthenticationViaKbdInt yes
# From A.03.10.005 onwards
X11Forwarding yes
#X11DisplayOffset 10
X11UseLocalhost no
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
#MaxStartups 10
# no default banner path
#Banner /some/path
#VerifyReverseMapping no
# override default of no subsystems
Subsystem sftp /opt/ssh/libexec/sftp-server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 06:58 PM
тАО04-18-2005 06:58 PM
Re: ssh2 login without password
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
This section is commented, so sshd ignore authorized_key file.
Uncomment it and restart sshd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 07:00 PM
тАО04-18-2005 07:00 PM
SolutionThe other major problem is when you inadvertantly put carriage returns into the "authorized_keys" file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 07:01 PM
тАО04-18-2005 07:01 PM
Re: ssh2 login without password
If that works then you know that directory permissions are incorrect and you can troubleshoot further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 07:34 PM
тАО04-18-2005 07:34 PM
Re: ssh2 login without password
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=244540
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=822731
tienna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 09:47 PM
тАО04-18-2005 09:47 PM
Re: ssh2 login without password
Hosts know each other and file known_hosts is ok.
the output of
my ssh passwordless connection seems to be big problem ... hm, so why on other hosts everything is ok, configurations of ssh, permissions, etc. are the same.
I wonder what the problem could be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 09:55 PM
тАО04-18-2005 09:55 PM
Re: ssh2 login without password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2005 10:00 PM
тАО04-18-2005 10:00 PM
Re: ssh2 login without password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2005 12:07 PM
тАО04-19-2005 12:07 PM
Re: ssh2 login without password
I suggest you check your permissions again. Not only on $HOME but also on all parent directories and /tmp. For example if $HOME is /home/
/ and /home are owned by root and not group/world writable (e.g. 755)
/tmp should be 1777
/home/
None of the files in /home/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2005 02:41 PM
тАО04-19-2005 02:41 PM
Re: ssh2 login without password
The problem was so stupid, user account on server was deactivated due to 3 unsuccessful login attempts.
I reactivated it and everything gone wright.