Testing the SSH Setup on a Host (2024)

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

  1. 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.

  2. 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

Testing the SSH Setup on a Host (1)Testing the SSH Setup on a Host (2)
Testing the SSH Setup on a Host (2024)
Top Articles
Latest Posts
Article information

Author: Eusebia Nader

Last Updated:

Views: 6288

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Eusebia Nader

Birthday: 1994-11-11

Address: Apt. 721 977 Ebert Meadows, Jereville, GA 73618-6603

Phone: +2316203969400

Job: International Farming Consultant

Hobby: Reading, Photography, Shooting, Singing, Magic, Kayaking, Mushroom hunting

Introduction: My name is Eusebia Nader, I am a encouraging, brainy, lively, nice, famous, healthy, clever person who loves writing and wants to share my knowledge and understanding with you.