The below problem has been solved, but I mark this thread as unsolved because another similar problem has arise:
when I am trying from a friend's machine (not being in LAN) to connect via ssh to my machine, it gets stuck while trying to connect.
Specifically, I have used dyndns to register a dns, and I have successfully setup a small webpage for personal use, being 'served' by my PC which also runs the APACHE server.
So, I can access my server on my local pc from anywhere outside my house by giving xxxx.dyndns.org to any browser.
Now, that I've installed the openssh server and ssh client, shouldn't I be able using xxxx.dyndns.org to access my pc from anywhere?
So, at first I tried sshing with:
and I got:Code:bingo@remotemachine:~$ ssh -v -p 22 xxxx.dyndns.org
and it stucks there till it outputs timeout.Code:debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to solpan.dyndns.org [100.100.100.100] port 22.
Then, I went to /etc/ssh/sshd_config to the local machine and changed the port to 8675 (randomly) and then I gave
and from the other machine (I could switch machines so easily because I was connected to the other machine using TeamViewer) I gave the same command as the above but using port 8675. Same result, it hangs till it outputs that the connection has timed out.Code:sudo service ssh restart
What can be wrong?
Solved problems of understanding SSH:
Soooooo, I've installed ssh and ssh server and I could login to localhost by giving
and typing in my login password.Code:ssh localhost
I currently don't have any local PC with linux in it so as to test it locally, but would I be able to login to my PC through an other local PC?
My local ip is static (192.168.1.254) and thus, if I give from an other local machine
will I be able to login?Code:ssh 192.168.1.254
Also, what about login in to my PC from an extrernal PC (behind other modem somewhere else)?
I will totally need my current external IP of my PC.
So the thought is taking the external IP of my PC every once in a while (it isn't static) and update an online file, like an U1 file, and from the external PC, through a script probably, check this file to see the IP address of my PC and then login through e.g.
But then more questions rise, what if two local machines (which have the same external IP address) have installed the ssh server, how does ssh know where to connect to?Code:ssh 184.108.40.206
Please help me clear it up a bit, because in the search I've done everything seems so easy to be done with ssh but all these questions stay unanswered to me.
Thanks in advance!