Testing the SSH Setup on a Host
After setting up SSH on a host, test the setup to ensurethat you can use SSH to contact the host from another host. Testingthe SSH setup on a host verifies that the SSH server daemon sshdis running and that the SSH user has a valid user account onthe host.
If you cannot use SSH to contact the host, troubleshoot the SSHsetup before setting up SSH user authentication.
To Test the SSH Setup on a Host
- From another host, use SSH to log in into the host thatyou are testing as the SSH user.
$ ssh -l user-name host-name
- user-name
The user name for the SSH user's account on the host.
- host-name
The host name of the host that you are logging in to.
- In response to the prompt, type your password.
If this step succeeds, your setup of SSH is complete.
The first time that you connect to a host, you might bewarned that the authenticity cannot be established and be asked if you wantto continue connection. If you trust the host, answer yes to connect to thehost.
Troubleshooting
To obtain diagnostic information, use the -v option of the command-line SSH clientand the -d option of the SSH server daemon sshd. How tostart the SSH server daemon sshd manually depends on the operating systemand SSH provider that you are using.
If the SSH server daemon sshd is set up on a host thathas a firewall, ensure that a rule is defined to allow inboundtraffic on the SSH port. The default SSH port is port 22.
If your connection is refused, the SSH server daemon sshd is not runningand you must start the daemon. For instructions, see the following sections:
If your connection is accepted, but you cannot log in, ensure thatthe SSH user has a valid user account on the host.
Next Steps
After testing the SSH setup, set up SSH user authentication to enable SSHto authenticate users without prompting for a password. For more information, see Setting Up SSH User Authentication.
Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices |