- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Paswordless SSH
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
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
07-07-2003 03:51 PM
07-07-2003 03:51 PM
Regards,
LAT
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2003 09:43 PM
07-07-2003 09:43 PM
SolutionThe first thing to do is to examine the settings in the ssh_config and sshd_config files.
Examine these settings in /etc/sshd_config:
"Protocol 2"
This should be 2 only as v1 is less secure, however if you are using a pc-client that only uses version 1, this will not work.
"# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key"
Ensure these files exist and have permissions root.system/600
Older versions have an option to allow root to login, however these days the default is NO so if it not mentioned assume that you cannot login directly as root. The idea is that you login as your normal user then su!
Examine these settings in /etc/ssh_config:
"IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa"
These files refer to ones that are created in the home directory of each user that attempts to use SSH. They are created when you first start SSH and the directory must belong to the user and have perms 700 or 750. The other files that are in your home directory
-rw-r----- authorized_keys2
-rw------- id_dsa
-rw-r----- id_dsa.pub
-rw-r--r-- known_hosts
Note. If you don't have id_dsa* files or id_rsa* files its because you haven't created a key pair yet. To create your keys run:
ssh-keygen -t [rsa|dsa]
This should create an id_[d|r]sa and id_[d|r]sa.pub files. It is very important that the permissions of these files are as above or SSH will not use them. You may have guessed that the .pub is your public key, and the other is the private key.
Now copy the ".pub" file to your target system as follows: scp ./.id_rsa.pub target:/tmp/id_dsa.pub
You will be prompted for your password on the remote system!
After the file has been copied run "ssh target" to login to the other system. Remember that you should have the same user account on both systems (eg. user andrew) or you have to make some slight adjustments.
Now cd to .ssh on the target system (create it if required) and run: cat /tmp/id_dsa.pub >> authorized_keys2 (If you are English note the mis-spelling of authorised!).
Now double-check the permissions as before and that sshd is running. Then logout of the remote system and return to you local machine and run: ssh remote
If the system still fails to login using keys try generating another key-pair using the other type. Eg if you used "dsa" last time use "rsa" and repeat the above steps but copy the public key to "authorised_keys" and see if this works.
Finally run your "ssh" with the "-v" option and paste the result in your reply.
Good luck,
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2003 09:49 PM
07-07-2003 09:49 PM
Re: Paswordless SSH
The first thing to do is to examine the settings in the ssh_config and sshd_config files.
Examine these settings in /etc/sshd_config:
"Protocol 2"
This should be 2 only as v1 is less secure, however if you are using a pc-client that only uses version 1, this will not work.
"# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key"
Ensure these files exist and have permissions root.system/600
Older versions have an option to allow root to login, however these days the default is NO so if it not mentioned assume that you cannot login directly as root. The idea is that you login as your normal user then su!
Examine these settings in /etc/ssh_config:
"IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa"
These files refer to ones that are created in the home directory of each user that attempts to use SSH. They are created when you first start SSH and the directory must belong to the user and have perms 700 or 750. The other files that are in your home directory
-rw-r----- authorized_keys2
-rw------- id_dsa
-rw-r----- id_dsa.pub
-rw-r--r-- known_hosts
Note. If you don't have id_dsa* files or id_rsa* files its because you haven't created a key pair yet. To create your keys run:
ssh-keygen -t [rsa|dsa]
This should create an id_[d|r]sa and id_[d|r]sa.pub files. It is very important that the permissions of these files are as above or SSH will not use them. You may have guessed that the .pub is your public key, and the other is the private key.
Now copy the ".pub" file to your target system as follows: scp ./.id_rsa.pub target:/tmp/id_dsa.pub
You will be prompted for your password on the remote system!
After the file has been copied run "ssh target" to login to the other system. Remember that you should have the same user account on both systems (eg. user andrew) or you have to make some slight adjustments.
Now cd to .ssh on the target system (create it if required) and run: cat /tmp/id_dsa.pub >> authorized_keys2 (If you are English note the mis-spelling of authorised!).
Now double-check the permissions as before and that sshd is running. Then logout of the remote system and return to you local machine and run: ssh remote
If the system still fails to login using keys try generating another key-pair using the other type. Eg if you used "dsa" last time use "rsa" and repeat the above steps but copy the public key to "authorised_keys" and see if this works.
Finally run your "ssh" with the "-v" option and paste the result in your reply.
Good luck,
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2003 09:49 PM
07-07-2003 09:49 PM
Re: Paswordless SSH
The first thing to do is to examine the settings in the ssh_config and sshd_config files.
Examine these settings in /etc/sshd_config:
"Protocol 2"
This should be 2 only as v1 is less secure, however if you are using a pc-client that only uses version 1, this will not work.
"# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key"
Ensure these files exist and have permissions root.system/600
Older versions have an option to allow root to login, however these days the default is NO so if it not mentioned assume that you cannot login directly as root. The idea is that you login as your normal user then su!
Examine these settings in /etc/ssh_config:
"IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa"
These files refer to ones that are created in the home directory of each user that attempts to use SSH. They are created when you first start SSH and the directory must belong to the user and have perms 700 or 750. The other files that are in your home directory
-rw-r----- authorized_keys2
-rw------- id_dsa
-rw-r----- id_dsa.pub
-rw-r--r-- known_hosts
Note. If you don't have id_dsa* files or id_rsa* files its because you haven't created a key pair yet. To create your keys run:
ssh-keygen -t [rsa|dsa]
This should create an id_[d|r]sa and id_[d|r]sa.pub files. It is very important that the permissions of these files are as above or SSH will not use them. You may have guessed that the .pub is your public key, and the other is the private key.
Now copy the ".pub" file to your target system as follows: scp ./.id_rsa.pub target:/tmp/id_dsa.pub
You will be prompted for your password on the remote system!
After the file has been copied run "ssh target" to login to the other system. Remember that you should have the same user account on both systems (eg. user andrew) or you have to make some slight adjustments.
Now cd to .ssh on the target system (create it if required) and run: cat /tmp/id_dsa.pub >> authorized_keys2 (If you are English note the mis-spelling of authorised!).
Now double-check the permissions as before and that sshd is running. Then logout of the remote system and return to you local machine and run: ssh remote
If the system still fails to login using keys try generating another key-pair using the other type. Eg if you used "dsa" last time use "rsa" and repeat the above steps but copy the public key to "authorised_keys" and see if this works.
Finally run your "ssh" with the "-v" option and paste the result in your reply.
Good luck,
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2003 09:51 PM
07-07-2003 09:51 PM
Re: Paswordless SSH
The first thing to do is to examine the settings in the ssh_config and sshd_config files.
Examine these settings in /etc/sshd_config:
"Protocol 2"
This should be 2 only as v1 is less secure, however if you are using a pc-client that only uses version 1, this will not work.
"# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key"
Ensure these files exist and have permissions root.system/600
Older versions have an option to allow root to login, however these days the default is NO so if it not mentioned assume that you cannot login directly as root. The idea is that you login as your normal user then su!
Examine these settings in /etc/ssh_config:
"IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa"
These files refer to ones that are created in the home directory of each user that attempts to use SSH. They are created when you first start SSH and the directory must belong to the user and have perms 700 or 750. The other files that are in your home directory
-rw-r----- authorized_keys2
-rw------- id_dsa
-rw-r----- id_dsa.pub
-rw-r--r-- known_hosts
Note. If you don't have id_dsa* files or id_rsa* files its because you haven't created a key pair yet. To create your keys run:
ssh-keygen -t [rsa|dsa]
This should create an id_[d|r]sa and id_[d|r]sa.pub files. It is very important that the permissions of these files are as above or SSH will not use them. You may have guessed that the .pub is your public key, and the other is the private key.
Now copy the ".pub" file to your target system as follows: scp ./.id_rsa.pub target:/tmp/id_dsa.pub
You will be prompted for your password on the remote system!
After the file has been copied run "ssh target" to login to the other system. Remember that you should have the same user account on both systems (eg. user andrew) or you have to make some slight adjustments.
Now cd to .ssh on the target system (create it if required) and run: cat /tmp/id_dsa.pub >> authorized_keys2 (If you are English note the mis-spelling of authorised!).
Now double-check the permissions as before and that sshd is running. Then logout of the remote system and return to you local machine and run: ssh remote
If the system still fails to login using keys try generating another key-pair using the other type. Eg if you used "dsa" last time use "rsa" and repeat the above steps but copy the public key to "authorised_keys" and see if this works.
Finally run your "ssh" with the "-v" option and paste the result in your reply.
Good luck,
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2003 09:51 PM
07-07-2003 09:51 PM
Re: Paswordless SSH
The first thing to do is to examine the settings in the ssh_config and sshd_config files.
Examine these settings in /etc/sshd_config:
"Protocol 2"
This should be 2 only as v1 is less secure, however if you are using a pc-client that only uses version 1, this will not work.
"# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key"
Ensure these files exist and have permissions root.system/600
Older versions have an option to allow root to login, however these days the default is NO so if it not mentioned assume that you cannot login directly as root. The idea is that you login as your normal user then su!
Examine these settings in /etc/ssh_config:
"IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa"
These files refer to ones that are created in the home directory of each user that attempts to use SSH. They are created when you first start SSH and the directory must belong to the user and have perms 700 or 750. The other files that are in your home directory
-rw-r----- authorized_keys2
-rw------- id_dsa
-rw-r----- id_dsa.pub
-rw-r--r-- known_hosts
Note. If you don't have id_dsa* files or id_rsa* files its because you haven't created a key pair yet. To create your keys run:
ssh-keygen -t [rsa|dsa]
This should create an id_[d|r]sa and id_[d|r]sa.pub files. It is very important that the permissions of these files are as above or SSH will not use them. You may have guessed that the .pub is your public key, and the other is the private key.
Now copy the ".pub" file to your target system as follows: scp ./.id_rsa.pub target:/tmp/id_dsa.pub
You will be prompted for your password on the remote system!
After the file has been copied run "ssh target" to login to the other system. Remember that you should have the same user account on both systems (eg. user andrew) or you have to make some slight adjustments.
Now cd to .ssh on the target system (create it if required) and run: cat /tmp/id_dsa.pub >> authorized_keys2 (If you are English note the mis-spelling of authorised!).
Now double-check the permissions as before and that sshd is running. Then logout of the remote system and return to you local machine and run: ssh remote
If the system still fails to login using keys try generating another key-pair using the other type. Eg if you used "dsa" last time use "rsa" and repeat the above steps but copy the public key to "authorised_keys" and see if this works.
Finally run your "ssh" with the "-v" option and paste the result in your reply.
Good luck,
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2003 09:51 PM
07-07-2003 09:51 PM
Re: Paswordless SSH
The first thing to do is to examine the settings in the ssh_config and sshd_config files.
Examine these settings in /etc/sshd_config:
"Protocol 2"
This should be 2 only as v1 is less secure, however if you are using a pc-client that only uses version 1, this will not work.
"# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key"
Ensure these files exist and have permissions root.system/600
Older versions have an option to allow root to login, however these days the default is NO so if it not mentioned assume that you cannot login directly as root. The idea is that you login as your normal user then su!
Examine these settings in /etc/ssh_config:
"IdentityFile ~/.ssh/identity
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa"
These files refer to ones that are created in the home directory of each user that attempts to use SSH. They are created when you first start SSH and the directory must belong to the user and have perms 700 or 750. The other files that are in your home directory
-rw-r----- authorized_keys2
-rw------- id_dsa
-rw-r----- id_dsa.pub
-rw-r--r-- known_hosts
Note. If you don't have id_dsa* files or id_rsa* files its because you haven't created a key pair yet. To create your keys run:
ssh-keygen -t [rsa|dsa]
This should create an id_[d|r]sa and id_[d|r]sa.pub files. It is very important that the permissions of these files are as above or SSH will not use them. You may have guessed that the .pub is your public key, and the other is the private key.
Now copy the ".pub" file to your target system as follows: scp ./.id_rsa.pub target:/tmp/id_dsa.pub
You will be prompted for your password on the remote system!
After the file has been copied run "ssh target" to login to the other system. Remember that you should have the same user account on both systems (eg. user andrew) or you have to make some slight adjustments.
Now cd to .ssh on the target system (create it if required) and run: cat /tmp/id_dsa.pub >> authorized_keys2 (If you are English note the mis-spelling of authorised!).
Now double-check the permissions as before and that sshd is running. Then logout of the remote system and return to you local machine and run: ssh remote
If the system still fails to login using keys try generating another key-pair using the other type. Eg if you used "dsa" last time use "rsa" and repeat the above steps but copy the public key to "authorised_keys" and see if this works.
Finally run your "ssh" with the "-v" option and paste the result in your reply.
Good luck,
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 11:19 AM
07-08-2003 11:19 AM
Re: Paswordless SSH
You need to have the key of the sshd on the other machine then you could connect to.
Also you need to configure the ssh
Caesar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2003 11:25 AM
07-08-2003 11:25 AM
Re: Paswordless SSH
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd95a2d88ce9cd711abdc0090277a778c,00.html
Chris Vail has a document attached which handles the whole thing, even permissions.
Its worked for me on Linux and HP-UX.
I think I have posted this doc like 100 times.
See Chris Vail's report.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com