I am new to ssh and have been racking my brains for several days over connecting a home computer to an remote computer. I found out that I can't connect, as they are on different networks. I am sure that this problem has a simple solution, but after a day of futile searching for a solution to my problem, I have to resort to your help.
My remote server is located at the IP address
192.168.0.1, and my home computer is
192.168.18.118 Both are on the same port (temporarily)
1729. The only difference is the username, the home PC username is
Thomas, and the remote username is
Help please solve this problem, the usual connection by typing in the username of the remote server, the IP address of the remote server and the port of the remote server end with a timeout error. Thank you very much in advance.
The problem is that I don’t know how to use all this. I don’t know how to use all this, because on the Internet I watched a half-tone video, articles and much more, but I couldn’t find a concrete explanation of how to connect two such computers via ssh. In addition, it was not possible to find even at least some example of how this is done.
Assume that the global IP address of my home PC is
70.***.**.**, and the local address is
192.168.18.118. Also suppose that the global IP address of my remote PC is
75.***.**.**, and the local address is
192.168.0.1. Both included
1729 port and hostname archlinux, username of the home PC
Thomas, and the remote
Tom. Now the question is, how do I connect these two computers with each other, that is, how do I access from my home PC to a remote one and vice versa?
I would be extremely grateful to all of you if you could help me connect my home computer to the remote, as I really need it.
Continue EDIT 14.10.2019
I tried the way you said and got the answer
ssh: connect to host
1729: Connection timed out
For the sake of interest, I tried to connect to my home PC in this way, only with the global IP address of the home PC and with the username on the home PC, and I got this response
ssh: connect to host
1729: Connection refused
$ ss -nltu Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port udp UNCONN 0 0 0.0.0.0:68 0.0.0.0:* tcp LISTEN 0 128 127.0.0.1:5432 0.0.0.0:* tcp LISTEN 0 128 127.0.0.1:6463 0.0.0.0:* tcp LISTEN 0 128 0.0.0.0:1729 0.0.0.0:*
How can I complete the process?
Answer to connect on home PC to global IP home PC:
$ ssh Thomas@70.***.**.** ssh: connect to host 70.***.**.** port 22: Connection refused
Answer to connect on home PC to global IP remote PC:
$ ssh Tom@75.***.**.** ssh: connect to host 75.***.**.** port 22: Connection timed out.
Result of scan home PC global address:
$ nmap 70.***.**.** -p 22 Starting Nmap 7.80 ( https://nmap.org ) at 2019-10-16 00:44 +04 Nmap scan report for 70.***.**.** Host is up (0.00039s latency). PORT STATE SERVICE 22/tcp closed ssh Nmap done: 1 IP address (1 host up) scanned in 0.35 seconds
When I scan global IP address my remote PC I give similar answer, but
STATE indicate as