Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have recently configured an old PC of mine to run Ubuntu 12.04 Server to be used as an FTP Client. However, I want to find out how I can access it from a Remote Desktop (I.e: Not on the Wireless Network at Home).

share|improve this question

1 Answer 1

When you ssh daemon is already running you can estimate by the following command on which interface sshd is listening (in my case):

$ netstat -putan | grep sshd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1690/sshd

As you can see my ssh daemon is listening on 0.0.0.0:22 that means on every network interface at port 22. This behavior is configured in the file /etc/ssh/sshd_config where you can set another address to listen on by the following statement:

ListenAddress 1.2.3.4

Where 1.2.3.4 is the address to listen on. In your case you can set 0.0.0.0 or the specific public ip-address of your PC.

If your computer is behind a firewall you need to forward the port (default: 22) to your computer. But I recommend to use another port than 22, because most bots out there are trying to brute force login via ssh over port 22 as you will see in /var/log/auth.log.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.