Admins and power users, what better way to flex your Android tablet's muscle than to install a secure shell (SSH) server? You can easily use Secure FTP (SFTP) to copy files to your tablet, but for many SSH servers, you have to root your device. Fortunately, I've found a server that doesn't require root access — that server is SSH Server, and it's available for free on the Google Play Store.
SSH Server offers the following features:
- Support for SFTP and SCP
- Multiple users can be set (each with their own options)
- Set custom shell start command and arguments
- Start/Stop server automatically when connected/disconnected from a specified Wi-Fi network or on boot
- Verbose logging
- Only allow specified IP addresses (optional)
- Add Dynamic DNS Updater using the local or public IP of your device
- Access server from web
Let's walk through the process of installing SSH Server, setting up a connection, and connecting to that server from a desktop machine.
Installation is simple. Just follow these steps:
- Open the Google Play Store
- Search for "ssh server"
- Tap the entry for SSH Server (by developer Ice Cold Apps)
- Tap Install
- Tap Accept & download
Once it's installed, you'll find SSH Server located in the app drawer or the home screen (or both locations). Tap the launcher to begin setting up your server.
Setting up a server
First, you must set up a server. During this process, you'll also have to create a user. Without creating a user, you won't be able to log into the server. Let's walk through this process.
- To create a new server, tap the Add button from the main window
- Tap SSH Server from the drop-down menu
- In the Settings tab (Figure A), fill out the necessary information
- Scroll to the bottom of this screen and enable the options that are needed (such as Vibrate on new connections, Start directly when app starts clean, etc.)
SSH Server on the Verizon-branded Samsung Galaxy Tab.
Once you have these options take care of, but before you back out of this screen, tap on the Users tab. In this section, you must create a new user to go along with the server. Here are the steps:
- Tap Add
- Fill out the necessary information (Figure B)
- Tap the Back button when complete
If you don't want to contain the user with the document root, uncheck that option, and they'll be able to navigate the file structure of the device.
It's very important to note that the directory specified for the user must be accessible by said user. The problem with a non-rooted Android device is that it's very difficult to create directories with permissions such that user, group, and others all have write permissions. Because of this, it's safe to use the /mnt/sdcard/Download directory. With this directory, you can use SFTP to copy files to the device.
Tap the back button out of the Settings window. When you're prompted to save your settings, tap Yes, and you'll be taken back to the main window.
Starting the server
You have two options here:
- Start all servers
- Start individual servers
NOTE: The free version of this software only allows you to have one server set up. However, you probably won't need more than this.To start the server you've set up, tap the listing, and then tap Start/Stop. When the server is running, it will be listed as "started." Next, tap the Info button (at the top of the main window), where you'll find the information you need to make your connection (Figure C). Figure C
The Info screen shows you details for making your connection.
Now that you have all the information you need, it's time to connect.
Connecting to SSH Server
You can connect to your new SSH Server with most secure shell clients. If you're connecting via the command line, you'll need to make sure you add the port switch at the end of the command, like so:
ssh -v -l USERNAME ADDRESS -p PORT
Where USERNAME is the actual username set up for the server, ADDRESS is the IP address, and PORT is the port associated with the server.
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.