SSH

Secure Shell Protocol

SSH is a cryptographic network protocol for operating network services securely over an unsecured network. OpenSSH is a suite of secure networking utilities based on the Secure Shell Protocol.

Usage

ssh - Connect to a remote server.

ssh user@ip_address

ssh-add - Add keys to the ssh-agent.

ssh-keygen - Generate new keys. ssh-copy-id - Copy keys to remote servers. It will prompt you for the password.

ssh-copy-id -i ~/.ssh/id_rsa.pub user@ip_address

Configuration

Files

chmod these file with 600 permission.

Examples

Host configuration. This allows you to run ssh myserver instead of ssh user@ip_address. We can also specify the ssh key we want to use.

Host myserver
  Hostname ip_address
  Port 22
  User user
  IdentityFile ~/.ssh/id_ed25519

Add keys to the agent after the first use.

AddKeysToAgent yes

Resources