System Servicessshsecure-shellremote-accessfile-transferauthenticationencryption

OpenSSH

OpenSSH provides secure shell (SSH) client and server for encrypted remote access and command execution over insecure networks. It includes tools for secure file transfer, key management, and authentication agent support.

Description

OpenSSH is a free implementation of the Secure Shell protocol, enabling secure encrypted communications between untrusted hosts. The client tools like ssh, scp, and sftp allow logging into remote machines, executing commands, and transferring files securely. X11 connections and TCP/IP ports can be forwarded over the secure channel, replacing obsolete insecure programs like rsh, rcp, and rlogin.

Key utilities such as ssh-agent, ssh-add, ssh-keygen, ssh-keyscan, ssh-copy-id, and ssh-argv0 facilitate public key authentication and key management. The server package provides sshd for hosting secure access from remote machines, with additional modules like openssh-sftp-server for SFTP support. GSS-API variants are available for Kerberos integration.

Note that in some countries, encryption use may require special permits. The metapackage 'ssh' installs both client and server for convenience.

How It Works

OpenSSH implements the IETF secsh Secure Shell protocol, providing encrypted communications via ciphers, MACs, and key exchange. SSH clients connect to sshd servers, authenticating via passwords or public keys managed by ssh-agent. Port forwarding tunnels traffic securely, while SFTP implements SSH filexfer protocol revision 3. Keys are generated and scanned using specified algorithms like RSA, ECDSA, Ed25519.

Installation

bash
sudo apt install openssh-client

Flags

-hShows usage help (returns unknown option error)
-46AaCfGgKkMNnqsTtVvXxYyssh options for address families, agents, ciphers, and more
-c cipherscp/sftp: Select cipher
-i identity_filescp/sftp/ssh: Specify identity file
-P portscp/sftp: Specify port
-l limitscp/sftp: Bandwidth limit
-Dssh-add: Delete all identities from agent
-Lssh-add: List public key parameters
-fssh-copy-id: Force mode, copy without checking

Examples

Display scp usage help
scp -h
Display sftp usage help
sftp --help
Display ssh usage help
ssh -h
Add default private keys to ssh-agent
ssh-add
Display ssh-agent usage help
ssh-agent -h
Display ssh-copy-id usage help
ssh-copy-id --help
Display ssh-keygen usage help
ssh-keygen --help
Display sshd usage help
sshd -h
Updated 2026-04-16kali.org ↗