Imagine, you are on vacation and then suddenly you got a call from your boss, asking you to troubleshoot a server issue. Well, usually, this isn’t a big problem. Most of you’ll install an SSHclient on your smartphone and log in to your remote server.
But how about the other way around?
Is it possible to access your Android from a computer using SSH?
Say, your Android phone is in some other room and you want to grab some files from it, but you are too lazy to get up from your seat, well then in this tutorial we’ll see how to do it. And you can a lot of other cool stuff.
What else can you do with this?
You can completely control your Android over WiFi using SSH and command lines ls, reboot -f, mkdir, find, etc. Though, to take the full advantage of this, you’ll have to familiar with the terminal command.
If you are transferring data from your Computer to Android (or vice versa) using regular apps like Airdroid, then every time you make a connection, you’ll have to authenticate it. But with SSH, there is no need for authentication every time you want to connect and no file size limit like Pushbullet.
What will you need
We will need an SSH client and an SSH server running on the computer and Android respectively.
- First, you need to install an SSH server on your Android. For this we’ll use SSHelper app, it doesn’t need ROOT.
- Next, to access your Android from Computer, we’ll use SSH client like putty.
Follow the steps
Get SSH server on Android
1. Head over to Google play store, install SSHelper app. Once done open the app and wait for it to install the necessary keys
2. To login into SSH, you’ll need 4 things – IP address, Port number, username, and password of the server. So, tap on the Setting icon in the SSHelper app and there you’ll find all these 4 values. Take a note of it. We’ll need this later.
The default username and password are admin and admin, it’s advisable to change it. And once you are done, scroll down and tap on Restart server with new values option to save changes.
Get SSH client on your computer
Make sure the SSHelper app is running on your Smartphone.
1. Download PuTTY.exe on your PC, it’s a single executable file, just double click on that and PuTTY will start.
2. Enter the IP address of your Android and change the SSH port to 2222.
3. You will get a warning message since we are just setting it up for the first time, you can ignore the message by clicking on No.
4. A command line will open up, type in username admin and hit enter. Next for password type admin (or your new password, if you have changed it). In Linux, you don’t see the cursor moving or asterisk when you type the password, so just type your password and hit enter.
And that’s it. After successful log-in, you will be able to access your Android from your computer over SSH. MacOS or Linux
You can read the SSH logs from your computer by typing IP_address_of_Android:8080, However, this is only read-only, you can’t execute a command or do anything, so in order to do that, we need to install SSHclient on the computer.
Unlike Windows, MacOS and Linux have a built in ssh client in the terminal. Just open the terminal and type in ssh username@ip_address and then type in your password.
How to access Android GUI from computer
If you like to transfer files between your computer and Android over SSH, then you’ll have to install GUI client like
2. Open WinSCP and enter the 4 values – IP address of Android, port number, username, and password. And then click on connect.
3. Ignore the security warning at this moment, since we are just setting it up for the first time. You can reconfigure it next time.
4. And that’s it, you’ll see 2 half on WinSCP. The left side is your computer files and on the right, we have your Android file system. To move around files, you just have to drag and drop them in the respective folder.