Old way

I used not to care about how I connect via ssh - as it seemed too trivial operation. But I was wrong! Do you also want one-liner to connect?

New way - source

Almost all is described here: https://linuxize.com/post/using-the-ssh-config-file/. Managing your config file makes it truely trivial to create connections.

SSH keys

Tired of writing password each time? You can generate ssh keys. Well described here: https://www.ssh.com/ssh/key/

Short instruction:

Client side

Generate keys:

ssh-keygen -t ed25519 -C "<some comment>"

Copy generated pub file content.

In config file add line: IdentifyFile /absolute_path/to/generated_file

Server side

Add in new line in file authorized_keys (somewhere on path ~/.ssh aka /home/your_user/.ssh) copied content.