Connecting to a Remote Server
Use thessh command to establish a connection to a remote host:
Parameters
| Parameter | Description | Example |
|---|---|---|
-p | Port number | 2222 |
-v | Verbose output for more connection details | — |
To simplify repeated connections, create a host-specific configuration file using SSH client config aliases.
known_hosts
When you SSH to a server for the first time, a fingerprint is displayed and you are prompted to confirm the connection. Accepting it saves the fingerprint to your local~/.ssh/known_hosts file, so you are not prompted again on future connections.
The
known_hosts file is automatically created in your local ~/.ssh/ directory the first time you accept a server’s fingerprint.