Posts filed under ‘Remote Administration’
I know this is an old idea and it’s been done several times over, but what would be a cool tech blog without my own tutorial on this? We’ll be making a server that you can connect to from just about anywhere.
Setting Up the Server
Fire up Synaptic Package Manager and search for “ssh”, or if you prefer faster way and willing to get your hands dirty, open up a terminal window and type:
sudo apt-get install ssh
After installing SSH, we need to put it in just enough security to help us sleep more soundly at night. Configure SSH by typing:
sudo vi /etc/ssh/sshd_config
Look for the following lines and set their options as so:
Ok, we have to restart SSH for these settings to take effect. Type in:
sudo /etc/init.d/ssh restart
At this point, you can already connect to your computer from another computer. Just type in the remote computer (for Linux computers)
ssh firstname.lastname@example.org OR
(for Windows computers) Install Putty and use that to connect.
You should try it out at this point to get yourself familiar with the login process.
User corresponds to one of the server’s users, including root. Although, we already disabled root login.
Next, we setup Remote Desktop.
System > Administration > Remote DesktopCheck “Allow other users to view your desktop” and “Allow other users to control your desktop” Uncheck “Ask for confirmation” and check “Require password” and set a nice, secure password (You could also opt to uncheck this as well, since you’ll be tunneling VNC through SSH).
Setting up the Client Computer
For Windows, install Putty or your favorite SSH client.
For Linux, if it’s not already installed, search for SSH in Synaptics or type
sudo apt-get install ssh
Also, install your favorite VNC client, such as WinVNC or TightVNC. (This is not necessary for Linux computers since it is usually built in).
- Start up putty.
- Expand “Connection”
- Expand “SSH”
- Go to Tunnels
- Enter the source port you’ll be using
- Enter <destination address>:<destination port>
Source port is the port number for your client machine (the one you’re using to connect). You can set this to any port available at your disposal. Notice here one of the tunnels
L8080 helium.kicks-ass.org:5900 I used 8080 as the source port since the other ports were being blocked by our corporate firewall.
Destination port is the port number for your server machine (the one you want to connect to). The default port for VNC is 5900, so we’ll use that.
Go back to “Session” menu and type in a name in “Saved Sessions” and click on Save, unless you want to set your Putty everytime you run it.
- Ok, the Windows method first. Start up Putty, click on your saved session, then click Open.
- Login to the server.
- Fire up VNC
You’ll be shown a dialog box, enter your destination IP or domain and port with the format <destination IP>:<display>:<port> Since we’ll be using the default display, we can just omit that but we still have to leave the colons behind. Click OK
- If you set a password in the Remote Desktop settings, you’ll need to enter that next, as well.
That’s it. Now for the Linux way.
- Connect to SSH
sudo ssh -L 8080:domain.com:5900 email@example.com
- Connect to VNC
vncviewer domain.com -listen 8080
Don’t forget to open up the SSH port (22 by default) in your router/firewall as well.
Dynapic IP Address
Not all of us are so lucky to have their own domain name or a permanent IP address. Usually, the Internet service you get from your provider automatically assigns you an IP address, and that address rotates from time to time, like in the case of PLDT MyDSL. So if you’re far away from home, how do you determine what your home’s IP address is? You can get a free host name to alias your dynamic IP by registering one in http://www.dyndns.org or other dynamic IP host name providers.
Transferring Files Between Computers
In Windows, just install WinSCP, enter the IP or domain of your server as well as the password, and you’re good to go.
For Linux users, type in
scp -r folderOrFile firstname.lastname@example.org:/home/user/
To transfer files from your server, just interchange the parameters.
Using just these, you can have Azureus or your favorite Bittorrent client, set it so that it checks for new torrents now and then, and just SCP the torrent files into your server.
We’re Done Here
So there you have it, a basic remote-controlled computer. It’s up to you, though, to beef up the security as you see fit, or add other applications or features to this set up. Enjoy!