How to Use the Chrome Browser Secure Shell App to SSH into Remote Devices « Null Byte :: WonderHowTo

Many guides on Null Byte require using theSecure Shell(SSH) to connect to a remote server. Unfortunately for beginners, learning to use SSH can become a confusing mix of third-party programs and native OS support. For Chrome OS users, using SSH is even more difficult. We'll fix this by using the Chrome Secure Shell to establish an SSH connection from any device that can run a Chrome browser.TheSecure ShellChrome extension and app providePuTTy-like functionality for those that are familiar with the third-party Windows software. The extension and app arexterm-compatible terminal emulators and standalone SSH clients for Chrome. They work by combining theSSHcommand ported to theGoogle Native Clientwith thehtermterminal emulator, which allows the app to provide a Secure Shell client within the browser without relying on external proxies.Don't Miss:How to Enable the New Native SSH Client on Windows 10In just a few minutes, you'll be able to establish an SSH connection from your Chrome browser. For obvious reasons, you're going to need to install the Chrome browser, so make sure todownload Chromeif you don't already have it installed.Step 1: Install the Chrome Secure ShellTo begin, you need to download the Secure Shell extension or app from the Chrome Web Store, depending on what device you're using. If you're using a Chrome OS device, you'll want the app. All other devices should use the extension. After opening one of the links below in your Chrome browser, click on the "Add To Chrome" button in the top right-hand corner of the pop-up window.Chrome Web Store Link:Secure Shell ExtensionChrome Web Store Link:Secure Shell AppFollowing that, a dialog window will appear asking you to confirm that you want to add the extension or app. Click on "Add extension" or "Add app" to install. If you chose the extension, it's available to use immediately. For the app version, it shouldn't take more than a few seconds to finish installing.Step 2: Open the Chrome Secure ShellYou can access the Secure Shell Extension in Chrome by clicking the extension's icon in the toolbar, then "Connection Dialog," or by typingsshin the address bar and hitting theTaborSpacebarkey followed byEnter. The icon will open in a new window while the address bar shortcut will be in the tab you're currently in.For the Secure Shell App, you can click on "Launch App" from its Web Store page. In addition, you can usechrome://appsin the address bar or click on "Apps" in the far-left of Chrome in the bookmarks bar, then select "Secure Shell." It's also possible to open it in a Chrome tab using thesshtrick in the address bar like with the extension.Step 3: Save a New ConnectionNow that we have the Secure Shell extension or app open and running, it's simple to establish an SSH connection. In the SSH screen, there will be a pane with several settings available. Look at the first setting, and ensure that "New Connection" is selected by clicking on it so that it looks like the image below. If you've never used Secure Shell before, it will be selected automatically.Next, type a name for your new connection in the top text box which says "username@hostname or free form text." The name can be anything, so try to pick the most accurate name that will help you remember which connection goes to which device. For example, you might use "retroPie" or "Basement media server," as even a somewhat specific name like "Raspberry Pi" can become confusing when you have more than one Pi.Alternatively, you can simply begin typing the connection into the name bar as I did, and it will automatically fill in the proper boxes below. Otherwise, you will need to fill each box in manually.In the "username" box, you should put the username for the server you're connecting to. Some common default usernames arerootandpi.The hostname should be the web domain or IP address of the server you wish to connect to. In my case, I'm connecting to my Android phone, which is on my local Wi-Fi network. Because this is the case, I'll be using use my Android phone's local IP address of192.168.0.13.After that, a port needs to be selected. The default port number for SSH connections is22, but this can be easily changed, so your server may use a different port. For instance, I'll be using port 2222, which is what theSSHDroidapp uses on my Android phone.Once all of the required information has been entered, click the "Connect" button at the bottom of the pane or pressEnter. Skip down toStep 6below to see what to do next, or check outStep 5to see how you would access your new saved connection later.Step 4: Start Your Saved ConnectionAfter you first make the connection, you'll only need to select the name of the connection in the box to connect again, not "New Connection," as the app will remember all of the login details.Perhaps the most exciting feature to use with the Secure Shell is it allows you to establish an SSH connection in a matter of seconds by simply typing in the search bar at the top of the browser. To do this, you can use the following format, which is the same as you might use in amacOSorLinuxterminal window. Don't foget to hitTaporSpacebarbefore entering the connection info.ssh username@host:portDon't Miss:Use SSH Local Port Forwarding to Pivot into Restricted NetworksEven faster, if you have the extension installed, you can click on the extension's icon in the toolbar, then select your connection's name. A new window will appear with the connection being made.Step 5: Log in to Your Remote ServerUpon a successful connection, you will see the always-familiar terminal window appear in the window or tab. The first time you connect to a server, you will be provided with a key fingerprint that you need to accept. This fingerprint is used for easy identification and verification that the server you are connecting to is legitimate.Connecting to root@192.168.0.13...
The authenticity of host '[192.168.0.13]:2222 ([192.168.0.13]:2222)' can't be established.
RSA key fingerprint is SHA256:fvQg9YFJSoQ5PyyaKDx4tAUOHPkSTxs0TRWiJnIEIMM.
Are you sure you want to continue connecting (yes/no)?The fingerprint should be the same every time you log in to the same system. If you ever get a message that the fingerprint has changed, it's a warning sign that someone is interfering with the connection. After accepting the fingerprint, you'll be prompted to enter your credentials, just like any other SSH connection.Connecting to root@192.168.0.13...
The authenticity of host '[192.168.0.13]:2222 ([192.168.0.13]:2222)' can't be established.
RSA key fingerprint is SHA256:fvQg9YFJSoQ5PyyaKDx4tAUOHPkSTxs0TRWiJnIEIMM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[192.168.113.113]:2222' (RSA) to the list of known hosts.
SSHDroid
Use 'root' as username
Default password is 'admin'
root@192.168.113.113's password:
:/data/data/berserker.android.apps.sshdroid/home $ cThat's it! You've successfully used your Chrome browser to establish a SSH connection to your remote device.Step 6: Enable Key-Based AuthenticationPasswords aren't the only way to authenticate an SSH connection. The other most common method is called public key authentication. This method uses a cryptographic key pair, one public and one private, in place of a password. The public key is configured on the server to authorize server access to those users with a copy of the private key.Using key-based authentication adds an extra layer of convenience when a human is connecting by eliminating the requirement to input a password. The key exchange is considered to be the password instead. Key authentication is also the de-facto way to set up an automated SSH connection, such as automated file transfers.Don't Miss:How to Create a Native SSH Server on Your Windows 10 SystemSecure Shell includes the ability to employ key-based authentication, which it calls "identity files." To import identity files from the connection screen, click on "Import" under the connection info, and select your public and private keys.The private key should not have a file extension, while the public key should have the PUB extension. For example, you might have "id_rsa" as your private key and "id_rsa.pub" as your public key.If the key pair is stored in a PEM file, you must split it into two files before importing. This can be by opening the PEM file in a text editor and copy and pasting each key into a new document. Without doing this, the app will not accept it. The PEM file will look something like this:-----BEGIN RSA PRIVATE KEY-----
[[KEY HERE]]
-----END RSA PRIVATE KEY-----

-----BEGIN PUBLIC KEY-----
[[KEY HERE]]
-----END PUBLIC KEY-----Save the new documents under the original filename. For example, "id_rsa.pub" would be the file name for the public key.If you ever wish to delete any of these keys because they are no longer valid, navigate to the connection screen, and select the identity associated with that key from the menu. Now, press theDeletekey. This will remove both the private and public key files from the HTML5 filesystem, as well as the saved connection.SSH Anywhere That Chrome Can RunThe Secure Shell Chrome app is a wonderful little tool to make the lives of developers, programmers, and hackers easier when connecting to remote devices. The ability to use SSH directly from your Chrome browser is not a groundbreaking feat, but it adds cross-platform convenience to using SSH that cannot be understated. For Chrome OS users, in particular, the Secure Shell app is the best way for you to be able to establish an SSH connection.Thanks for reading! If you have any questions, you can ask me here in the comments or on Twitter@The_Hoid.Don't Miss:Punchabunch Just Made SSH Local Forwarding Stupid EasyFollow Null Byte onTwitter,Flipboard, andYouTubeSign up forNull Byte's weekly newsletterFollow WonderHowTo onFacebook,Twitter,Pinterest, andFlipboardWant to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover photo and screenshots by Hoid/Null ByteRelatedHow To:Top 10 Browser Extensions for Hackers & OSINT ResearchersHow To:Access & Control Your Computer Remotely with Your Nexus 5How To:Configure a Reverse SSH Shell (Raspberry Pi Hacking Box)How To:Access & Control Your Computer Remotely Using Your iPhoneHow To:Run Your Favorite Graphical X Applications Over SSHHow To:Speed Up Browsing in Google Chrome with Kernel AdiutorHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 15 (Creating a Secure Tunnel to MySQL)How To:Add Chrome Custom Tabs to Every App on AndroidHow To:Use Remote Port Forwarding to Slip Past Firewall Restrictions UnnoticedHow To:Send ADB Commands to Android Straight from Google ChromeSPLOIT:How to Make an SSH Brute-Forcer in PythonHow To:Browse the Internet with Your Nexus Player's Remote ControlHow To:Use Apps & Play Games on Your iPhone Using Your ComputerHacking macOS:How to Bypass the LuLu Firewall with Google Chrome DependenciesHow To:Hack a remote Internet browser with XSS ShellHow To:Spy on SSH Sessions with SSHPry2.0How To:SSH file share on your Apple iPhone or iPod TouchHow To:Sync Chrome's Clipboard from Your Desktop to Your Android Phone & BackHow To:Use Desktop Chrome Extensions on AndroidHow To:Use SSH Local Port Forwarding to Pivot into Restricted NetworksHow To:Convert Your Favorite Android Apps into Chrome AppsHow To:Get Facebook Chat Head Bubbles on Your ComputerHow To:Clear Your Flash Cache and Browser CacheHow To:Apps & Extensions You Should Be Using Right Now in ChromeHow To:Change Slack's Default Browser to Chrome, Firefox, or SafariGoogle Chrome 101:How to Install the Beta Browser on iPhone & AndroidHow To:Comparing the 5 Best Internet Browsers for AndroidRasberry Pi:Connecting on ComputerHow To:Set Up a Remote Desktop Connection Easily & Quickly on Your ComputerHow To:This Snapdragon-Optimized Chrome Is Faster Than the Official Build & Adds Gesture SupportHow To:Adobe Flash Player Is Bad for Your Computer (Here's How You Uninstall It)How To:Stream Movies, Music, & Pictures from Your Nexus 5 to Your ComputerHow To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreHow To:Safely Log In to Your SSH Account Without a PasswordHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Remotely Control Computers Over VNC Securely with SSHHow To:Push and Pull Remote Files Securely Over SSH with PipesNews:Secure Shell Chrome Application is now available!How To:Create a Reverse Shell to Remotely Execute Root Commands Over Any Open Port Using NetCat or BASHHow To:Chrome Shares Your Activity with Google - Here's How to Use Comodo Dragon to Block It