Score:0

How can i connect pc remotely?

us flag

I need to use ssh but as i got i need to know IP address and the username of the PC .. so i tried to connect the PC using ssh [email protected] for example but got ssh: connect to host 1.1.1.1 port 22: Connection timed out

I installed in the server PC this command apt-get install open ssh- server

and in the client PC this apt-get install open ssh-client

unfortunately the server PC in another city . i tried to connect local IP address before i go and connected successfully but when i used now public id address i got connection times out

uz flag
Jos
Is your server PC behind a router? In that case, you should instruct the router to forward incoming packets on port 22 to your server.
Begnnier avatar
us flag
no it isn't .. but what other port number i can try to use it may be it works
uz flag
Jos
The `ssh` protocol runs on port 22, unless you instruct the server to listen to another port. Which is good practice, BTW.
Begnnier avatar
us flag
thanks but excuse me what other probabilities can i try to make the connection
uz flag
Jos
Can you ping the server from the client PC? Can you `ssh localhost` from the server to itself? Do you have firewall software running?
Begnnier avatar
us flag
i checked the firewall and got `Status: inactive` but `ssh localhost` do you mean i need to run `ssh 1.1.1.1` ?
uz flag
Jos
No, you need to run `ssh localhost` on the server.
Begnnier avatar
us flag
it is not available now to try it as the server in another city .. i will go tomorrow and will try
hr flag
Are you *sure* the server is not behind a router? For it to have different local and public ip addresses without a router would imply that it has multiple network interfaces - if that's the case, then you may need to modify its `/etc/ssh/sshd_config` file to make sure that its `ListenAddress` includes the public IP.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.