HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SSH problem:keep asking me the password
Operating System - HP-UX
1825775
Members
2156
Online
109687
Solutions
Forums
Categories
Company
Local Language
back
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
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
03-22-2007 10:16 PM
03-22-2007 10:16 PM
SSH problem:keep asking me the password
Hi all
I've installed Open-SSH on two HP-UX servers
And I want to configure SSH Client/User authentication
So I logged in Server A as root and run the following cmds:
Server A#ssh-keygen -t rsa
Server A#scp ~/.ssh/id_rsa.pub ServerB:~/.ssh/id_rsa.pub
Then I logged in Server B as root and:
Server B#cd ~/.ssh
Server B#touch authorized_keys
Server B#chmod 644 authorized_keys
Server B#cat id_rsa.pub >> authorized_keys
Then I logged in Server A as root again:
Server A#ssh Server B
And It prompted me to input PassPhrase
The reason I told you all above is that I think the configuration I've done is correct
Then I wanted to ssh to Server B as user1 and the problem come!
I follow the exactly same step as all above except that this time I created authorized_keys file in "~usesr1/.ssh/" directory
then this time it didn't work!
It keeps asking me the passwd of user1 on Server B
I don't know why.
Is that because we can't ssh to a server with passphrase unless we become a root?
Any advice
I've installed Open-SSH on two HP-UX servers
And I want to configure SSH Client/User authentication
So I logged in Server A as root and run the following cmds:
Server A#ssh-keygen -t rsa
Server A#scp ~/.ssh/id_rsa.pub ServerB:~/.ssh/id_rsa.pub
Then I logged in Server B as root and:
Server B#cd ~/.ssh
Server B#touch authorized_keys
Server B#chmod 644 authorized_keys
Server B#cat id_rsa.pub >> authorized_keys
Then I logged in Server A as root again:
Server A#ssh Server B
And It prompted me to input PassPhrase
The reason I told you all above is that I think the configuration I've done is correct
Then I wanted to ssh to Server B as user1 and the problem come!
I follow the exactly same step as all above except that this time I created authorized_keys file in "~usesr1/.ssh/" directory
then this time it didn't work!
It keeps asking me the passwd of user1 on Server B
I don't know why.
Is that because we can't ssh to a server with passphrase unless we become a root?
Any advice
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2007 11:36 PM
03-22-2007 11:36 PM
Re: SSH problem:keep asking me the password
Shalom,
Check the ownership and permissions of the home directory and .ssh foldder
drwxr-x--- 19 root root 4096 Mar 22 22:10 /root
The ownership must be right and the permissions must be exactly as they are above.
drwx------ 2 root root 4096 Oct 31 19:39 .ssh
-rw-r--r-- 1 root root 603 Nov 1 19:44 authorized_keys
-rw------- 1 root root 668 Oct 31 19:37 id_dsa
-rw-r--r-- 1 root root 601 Oct 31 19:37 id_dsa.pub
-rw-r--r-- 1 root root 1354 Mar 18 06:29 known_hosts
Any variance will cause the problem you are having.
SEP
Check the ownership and permissions of the home directory and .ssh foldder
drwxr-x--- 19 root root 4096 Mar 22 22:10 /root
The ownership must be right and the permissions must be exactly as they are above.
drwx------ 2 root root 4096 Oct 31 19:39 .ssh
-rw-r--r-- 1 root root 603 Nov 1 19:44 authorized_keys
-rw------- 1 root root 668 Oct 31 19:37 id_dsa
-rw-r--r-- 1 root root 601 Oct 31 19:37 id_dsa.pub
-rw-r--r-- 1 root root 1354 Mar 18 06:29 known_hosts
Any variance will cause the problem you are having.
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
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2007 12:04 AM
03-23-2007 12:04 AM
Re: SSH problem:keep asking me the password
Hi,
The key file authorized_keys should be 0700 permission and as well for the .ssh file, since no others are allowed to read the key.
Use the attached doc to set up password less authentication.
HTH,
Prabu.S
The key file authorized_keys should be 0700 permission and as well for the .ssh file, since no others are allowed to read the key.
Use the attached doc to set up password less authentication.
HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2007 12:10 AM
03-23-2007 12:10 AM
Re: SSH problem:keep asking me the password
You have to distinguish between password and (RSA) passphrase.
In your sample shell snippet you generated an RSA key pair without explicitly giving ssh-keygen a -N "" to demand for a passphrase less key pair.
If you entered something when asked for a passphrase this is the string you need to retype on connect.
If so, you can either remove the passphrase from your key pair by e.g.
$ ssh-keygen -p -f ~/.ssh/id_rsa -P "current phrase" -N ""
Or more secure yet, you could start the ssh-agent (should be put in your shell's profile file), and give it the phrase only once.
Then for subsequent connects the remote sshd will always ask your running ssh-agent.
e.g. (assume a Bourne like shell)
$ eval $(ssh-agent -s)
$ ssh-add ~/.ssh/id_rsa
Here it will ask for the keys' passphrase,
so enter it.
Then at your heart's content run any ssh commands to the remote host.
On shutdown of your shell you would have to end the ssh-agent.
This is best set up in a shell trap.
e.g.
trap 'ssh-agent -k' 0
In your sample shell snippet you generated an RSA key pair without explicitly giving ssh-keygen a -N "" to demand for a passphrase less key pair.
If you entered something when asked for a passphrase this is the string you need to retype on connect.
If so, you can either remove the passphrase from your key pair by e.g.
$ ssh-keygen -p -f ~/.ssh/id_rsa -P "current phrase" -N ""
Or more secure yet, you could start the ssh-agent (should be put in your shell's profile file), and give it the phrase only once.
Then for subsequent connects the remote sshd will always ask your running ssh-agent.
e.g. (assume a Bourne like shell)
$ eval $(ssh-agent -s)
$ ssh-add ~/.ssh/id_rsa
Here it will ask for the keys' passphrase,
so enter it.
Then at your heart's content run any ssh commands to the remote host.
On shutdown of your shell you would have to end the ssh-agent.
This is best set up in a shell trap.
e.g.
trap 'ssh-agent -k' 0
Madness, thy name is system administration
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP