SSH Client
SSH Client - Secure Remote Connection and Command Execution
The SSH (Secure Shell) client is an essential command-line tool for developers and system administrators. It enables secure login to remote machines and allows for the execution of commands on those remote systems. Understanding its syntax and options is crucial for efficient remote server management.
Basic SSH Connection
The most common way to connect to a remote server using SSH is by specifying the username and the host.
ssh user@host
Executing a Single Command Remotely
You can run a specific command on a remote server without initiating an interactive shell session. This is useful for scripting and automation.
ssh user@host command_to_run
Connecting with a Different Port
If the SSH server is running on a non-standard port, you can specify
it using the -p option.
ssh -p portnum user@host
SSH Connection Through an Intermediate Host
For scenarios where direct access to the target host is not
possible, you can use an intermediate "jump" host to establish the
connection. The -t option is often used to allocate a
pseudo-terminal.
ssh -t reachable_host ssh unreachable_host