I have used ssh before to login to a remote server connected via LAN.

I have two personal computers running on Ubuntu. Is it possible to connect the two using ssh so that I can login from one system to another and vice-versa? If so, how?


Yes, you can.

First, make sure package openssh-server is installed on both of them. Then, fire up terminal and type:

ssh username@domain-name.local - if you are on the same network or

ssh username@local-ip - same as above

or if you are connected to different networks:

ssh username@public-ip.

You can also setup password-less connection. First, generate keys using ssh-keygen (you can leave everything default).

Then, copy your public key using ssh-copy-id username@domainname.local (as above)

Repeat the process from the other machine.