HP-UX Secure Shell Getting Started Guide
# cat /opt/ssh/etc/ssh_host_dsa_key.pub ssh
root@RemoteMachine ’cat >> /opt/ssh/etc/ssh_known_hosts’
Or
# cat /opt/ssh/etc/ssh_host_rsa_key.pub ssh
root@RemoteMachine ’cat >> /opt/ssh/etc/ssh_known_hosts’
For SSH-1:
# cat /opt/ssh/etc/ssh_host_key.pub ssh root@RemoteMachine
’cat >> /opt/ssh/etc/ssh_known_hosts’
You can view the /opt/ssh/etc/ssh_known_hosts file on the server and verify that
the public host key of the client is added to this file.
6. In the server system, add the fully qualified host name of the client at the beginning of the
key in the /opt/ssh/etc/ssh_known_hosts file, as shown in the following example:
client.abc.com ssh-dss ssh-dss AAAAB3NzaC1kc3MAAACBAKCJJv/D2
Jo3Qejlhp2Z3OAvWjcQRa0c4e3gwEvYjXGECe/upvromDyNA4ou5n5rkPKBD
e37l3U+PYkKQ3KYQyb7b2+kZ3EkzHOGB0X57hrX0e3kAeHJhSpwdY6KpGQO7
CmVwHbn3R0NFY9c0sPw1rSADY6BsJ4IJXdi5dgakIGLAAAAFQDjKdniF5llT
NwSJZzdjqBDSJvaHwAAAIEAlbtE9eMzjVPSfo/peqerKm2qY/gfBL80kQKcA
wc81kzxdHO8Qisn823KtAlYfQOHCt/UVV6VIvNwD5fbLmhrzFCM39+YLPJre
09CQ41Nxuu+ttqGCIPVggzjp/AwOeuedmkqKyQ7PuErGHTb0UYsXqzv9Nj7s
h+UfRMdIjiVdKQAAACACQE0NxmxqTdFyDZaGnqLmzLcgMqMjr0UlzDGaPGyg
ds2LZ1uotvI4wBGIGteZxvlNiwxMXMvKc5Ej55oiefXCRLqHOp4JWo8sVQdh
VKxa1gpCVNYuGCmN5DGVDhT0bYV3GBs2/PAh1ky2hCCLd6sMAIhVLwIcqtOQ
bK6Hobu2qI= root@client
In this example, client.abc.com is the fully qualified host name of the client that is
appended to the key in the /opt/ssh/etc/ssh_known_hosts file.
7. To connect to the remote server, run the following command from the client system:
# ssh <server_name>
Where:
<server_name> specifies the name of the remote system to which you want to connect.
The HP-UX Secure Shell client connects to the HP-UX Secure Shell server.
Using User-Specific Configuration
To configure host-based authentication for non-superusers using user-specific configuration,
follow the steps specified in “Using Systemwide Configuration” (page 43). However, the host
configuration files that you need to update are user-specific files, not the systemwide files.
Table 4-4 describes the systemwide configuration files and the corresponding user-specific
configuration files.
Table 4-4 Host Configuration Files
Systemwide FilesUser-Specific Files
/opt/ssh/etc/shosts.equiv$HOME/.shosts
/etc/hosts.equiv$HOME/.rhosts
/opt/ssh/etc/ssh_known_hosts$HOME/.ssh/knownhosts
Configuring Host-Based Authentication for Superusers
To configure host-based authentication for superusers, follow the steps described in “Using
Systemwide Configuration” (page 43). For the superuser, HP-UX Secure Shell uses the information
specified in the $HOME/.shosts and $HOME/.rhosts files. It does not use the information
specified in the systemwide configuration files /opt/ssh/etc/shosts.equiv or /etc/
hosts.equiv.
44 Configuring HP-UX Secure Shell Authentication Methods