How to connect two personal computers using ssh?
Yes, you can.
First, make sure package openssh-server
is installed on both of them. Then, fire up terminal and type:
ssh [email protected]
- 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 [email protected] (as above)
Repeat the process from the other machine.
Enjoy!
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
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?