Hardware Reference
In-Depth Information
To make the actual service listen on another port, we usually need to edit the
configuration for the service and restart it. We'll take a look at SSH as an example:
1. Open up the SSH service configuration for editing:
pi@raspberrypi ~ $ sudo nano /etc/ssh/sshd_config
2. Find the line near the top that reads Port 22 , and change the port number to
something else, for example 2222 . Then save and exit nano .
3. Now reload the SSH service configuration with the following command:
pi@raspberrypi ~ $ sudo service ssh reload
Connected at last
So you're over at your friend's house again and you should finally be able to log
in to your Pi through SSH. Just remember to specify the port if you changed it to
something other than 22 . In PuTTY, simply change the Port field.
In Linux and Mac OS X, you would use the following command but replace [port]
with your port number and [gimmepi.mooo.com] with your domain name:
$ ssh -p [port] pi@[gimmepi.mooo.com]
Now that you're running an Internet facing service, it's also a good idea to keep
an eye on your log files for any log in attempts that you don't recognize. Use the
following command to view the log file where SSH records the log in information:
pi@raspberrypi ~ $ cat /var/log/auth.log
Tunneling
In computer networking lingo, tunneling means to embed one protocol inside
another. In this section, we'll be embedding HTTP traffic inside the SSH protocol.
Two good uses for SSH tunneling are:
• Encrypting traffic that would otherwise be sent in the clear to evade prying
eyes that might be snooping on the network traffic. For example, this could
be web content filtering software at your school/workplace or an oppressive
regime spying on its citizens.
• Tunneling through firewalls to access the computers on the inside as if you
were a computer on the local network. You could use this to safely access a
web/file server on your local home network from a distance, or even print
something on your printer in your home from somewhere else.
All you need to start tunneling is an SSH server reachable through the Internet and
your regular SSH client.
 
Search WWH ::




Custom Search