SSH Android | Configuration guide and best apps to use

%1$s', sprintf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ), esc_html( get_the_author() ), get_avatar( get_the_author_meta( 'ID' ) ) ) ); $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = $time_string . ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); printf( '%1$s', // WPCS: XSS ok, sanitization ok. sprintf( '%3$s', esc_url( get_permalink() ), esc_attr( get_the_time() ), $time_string ) ); if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( __( 'Comments', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) ); echo ''; } ?>

[ad_1]

Secure Shell or Secure Socket Shell (SSH) is an encrypted network protocol that allows you to access other computers over an insecure network (such as the Internet).

Although primarily a tool for system administrators, SSH can be useful for private users who want to execute commands and move files on media or home game servers, configure a VPN server on a leased VPS space, or the like. It is particularly useful for accessing headless servers without a screen or keyboard for entering commands.

In this article, we will see how to use your Android phone or tablet for SSH in a remote server. Fortunately, there are several very good SSH client apps for Android, so let's take a look at some of the best ones. In addition to that, we include a quick guide to turn your Android device into an SSH server host.

Command line access

Traditional SSH clients provide command line (terminal) access to SSH servers (any computer actively running SSH server software). And this remains by far the most common way to use SSH.

On desktop computers, X11 transfer allows you to run GUI applications remotely, provided that X transfer is also configured on the target computer. The only real way to do this in Android is through the rather buggy, but working XServer XSDL app.

For this article, we will assume that readers are looking for a more traditional SSH client. If you want full GUI access to a remote computer, applications such as AnyDesk and TeamViewer are much easier ways than configuring XServer XSDL.

If you want to transfer and rename files using a graphical interface, however, SFTP is an improvement over the old, very insecure FTP file transfer protocol. It basically works as FTP but secures the connection using SSH.

Best SSH apps for Android

Below we have listed the Android apps for SSH.

ConnectBot

ConnectBot is a 100% free and open source SSH (and Telnet) client and terminal emulator that can manage multiple simultaneous SSH sessions, create secure tunnels and copy / paste between other applications in Android.

ConnectBot

It is a traditional style SSH client, that is, it provides command line access to computers running SSH server software. A graphical interface is however available to configure the connections.

ConnectBot can run just about any SSH command and fully supports persistent connections, key management, and port management. A smart feature is URL parsing, which searches for everything that looks like a URL, which it presents as a list of links.

A customizable strip of special keys, such as CTRL and ESC, makes the terminal very easy to use without the need for an external keyboard (which is also supported). ConnectBot can be downloaded from the Play Store or via F-Droid.

Termius

Termius is a singing, dancing SSH client with support for ECDSA, ed25519 and chacha20-poly1305 encryption. Some advanced features not found in ConnectBot appear in the main app, which is free, and even more available through in-app purchases, but note that Termius is proprietary closed source software.

Terminus

Termius supports multiple SSH, Telnet, and Mosh connections in tabbed windows, port forwarding, has an integrated RSA / DSA / ECDSA key generator and a Putty key importer, and includes an SFTP client ( FTP over SSH) integrated for easy GUI management and file transfer.

Convenient high-end features include an integrated SFTP (FTP over SSH) client for easy management and transfer of GUI files, and “snippets” – predefined port or shell removal scripts that you can easily run at any moment. Like ConnectBot, Termius has a customizable keyboard strip for easy typing when not using an external keyboard.

Termius is available on the Play Store.

JuiceSSH

Like Termius, JuiceSSH is a very popular and comprehensive proprietary SSH client (and Telnet and Mosh) with in-app purchases for premium features. It supports ECDSA, RSA and DSA SSD keys and password, SSH key agent transfer, 2FA via Google Authenticator, and includes an RSA key generator.

JuiceSSH

One of the most interesting features of JuiceSSH is “Identities”, which allows you to define a set of usernames, passwords and / or private keys for several connections. It supports port forwarding, terminal characters and, like Terminus, “extracts”. It also offers to click on URLs to open them in your browser.

Premium features include automated AES-256 encrypted backups of all your connections and settings, a widget, dynamic port forwarding, integration with Amazon AWS / EC2, and more.

JuiceSSH is available on the Play Store.

Ghost commander

There are other “regular” SSH clients for Android, but with ConnectBot, Terminus and JuiceSSH being as good as they are, we really don't see the point of adding more to this list.

Ghost commander

So, instead, we're going to suggest Ghost Commander; a free and open source dual panel file manager for Android, for which an SFTP plug-in is available for transparent management of SSH encrypted files and transfer to a remote server.

Ghost Commander also allows you to manage local files (including files on an SD card or USB OTG devices), standard FTP, Google Drive, Dropbox and BOX or any cloud storage compatible with WebDAV and Windows network SMB shares (may require free plugins).

Video and audio content can be streamed from remote locations (including SFTP servers), and Ghost Commander includes an integrated text editor, multimedia previews, close / unzip functionality, and much more.

Ghost Commander is available on the Play Store and F-Droid. The popular and generally excellent (but closed source) Solid Explorer is another good option, which does a very similar job.

Configuration using an SSH Android client application

For this guide, we use the open source ConnectBot application to connect to the headless Raspberry Pi SSH server that we used for our PiVPN and Pi-hole projects. Although we use ConnectBot, the configuration of all Android SSH client applications is very similar.

  1. Download ConnectBot from the Play Store or via F-Droid, install it and run it.

  2. (Optional) Import a public SSH key. We secured our Pi server with just a username and password, as we only intend to access it through our local network. Servers accessible on the Internet must be secured with a pair of cryptographic keys.

    If this is the case for the SSH server to which you wish to connect, its administrator will share his public key with you. This can be transferred to your Android device storage by email, USB connection to PC, USB OTG stick or similar.

    To import a public key for an SSH server, on the Hosts screen, select hamburger menu icon -> Manage Pubkeys.

    Public Key Manager

    Hit him folder icon, go to the location imported [keyname].key file is on your device, and select it.

    Select public keys

    Press the back button to return to the Hosts Page.

    ConnectBot also allows you to generate key pairs that you can share with the server, but this is beyond the scope of this tutorial.

  3. Connect to an SSH host server. Whether you just imported a public SSH key or don't need it and just opened the app, you should now be on the Hosts page.

    Click it big + symbol at the bottom right of your screen to configure a new connection.

    Tap add symbol

  4. Make sure the protocol is ssh (it is by default) and under [email protected]: port enter your user name followed by the @ symbol then the IP address or the URL of the SSH host.

    SSL uses port 22 by default, so you do not need to fill this bit if your server uses port 22. If it uses a different port number, add :[port number] to the connection address.

    Edit host

    If the use of a public key is required, press “Use public key authentication“And select the key you imported in step 2.

    You can change any other setting you want, or you can be prompted to do so by your SSH server administrator. Press the + button when you are done.

  5. Back on the Hosts screen, select the newly created SSH host.

    Select the newly created host

  6. The first time (only) you log in, you will see a security warning. Select YES.

    Select yes

  7. Enter your password when prompted and your command prompt should change to that of your SSH host server.

    Enter your password

    You are now connected!

Pros and Cons of Using an SSH Client Application for Android

Benefits

The inconvenients

  • A touch screen is not the ideal way to enter terminal commands. Fortunately, most Android SSH apps support the use of an external keyboard (like almost any Bluetooth keyboard).

Configuring your Android device as an SSH host

The tutorial above shows you how to connect to a remote host on your Android device via SSH. It is also possible to configure your Android device as an SSH host server.

The method described in the tutorial below is something of a “quick and dirty” approach that lacks frills. But it is easy to implement and works without requiring root access.

  1. Download, install and run SSHelper.

  2. Enable file writing. You will only need to do this once.

    Enable file writing

    As the instructions say, touch Okay to visit the information page on the SSHelper application -> Authorizations -> Storage room -> To allow.

    Authorize storage authorization

    Touch the back arrow until you return to the SSHelper Log screen, which should show that the SSH server is already operational. In the future, simply starting the application will launch the SSH server.

    SSH server operational

  3. Select the Config tongue. To connect to your Android device via SSH, you will need the server's IP address, port number and password. Note that SSHelper accepts any username when connecting.

    Configuration tab

  4. By default, the server password is admin. It is a very good idea to change it to something safer. When you are finished, scroll to the bottom of the page and click “Restart the server with new values”.

    Restart the server

    Your Android device is now an SSH server host to which you can connect in the usual way (for example, in Android using the instructions in the previous section).

    SSH server host

We describe how to connect to an SSH server (like the one we just created) from Windows, macOS, Linux and iOS, in How to connect to a Raspberry Pi. Above, we connected to our Android server SSHelper from Windows using PuTTy.

The only thing to note is that you will not be able to log in as root unless the host Android device has been rooted.

Test if SSH works

When you successfully connect to another computer, you will see a terminal command prompt that belongs to that computer.

In other words, exactly what it would look like if you were physically sitting on the host computer using a terminal emulator such as Terminal (Linux and macOS), Command Prompt / Windows PowerShell (Windows) or Terminal emulator for Android.

Test if SSH works 1

We can easily see above that we have connected to our Raspberry Pi. More usefully, you will now be able to execute commands as if you were sitting in front of the host computer. If you don't know where to start, entering help will almost always display a list of valid commands.

Test if SSH works 2

If you are using an SFTP application (such as Ghost Commander or Solid Explorer), you will be able to view, rename, move and preview (etc.) files on the host computer using a graphical interface if you are correctly connected .

[ad_2]

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments