[ENG][RPi] SSH (Secure Shell) with Raspberry Pi via Multi-Platforms

Sathittham (Phoo) Sangthong
SS Blog
Published in
8 min readJul 9, 2016

--

SS-SSH-fb-share (1)

This blog, we will play around with SSH-Client on various of operating system e.g. Windows, macOS, Linux, Android, iOS and Chrome. At this time we will be working on Local Network, for getting to know the basics of it ….Let’s Go !

What’s SSH ?

SSH or Secure SHell is the way that we use our Local computer to remote access to our Server (SSH-Server) with Command line (Black Screen). With this method, all the data that we send through the network will be encrypted. SSH will makes our encrypted data more secure than plain text (Telnet).

SSH_Protocol1
Image from IBM

SSH will create a Secure Channel over the unsecured network. It’s work as Client-Server. The Server or Remote Host will need to install SSH Server software. The Client or Local Host will need to install SSH Client.

Most of SSH protocol will be work on Unix-like OS, e.g. Linux or macOS. For Microsoft Windows will be able to use directly with Windows 10 Insider Preview (Beta version). By default SSH uses port 22.

Basic Command for SSH

Most of SSH command will be work on Unix-like OS, e.g. Linux or macOS. The basic command is “ssh”.

ssh remote_host

remote_host is the IP address or domain name that we will connect to. To use this command, username of SSH Server and SSH Client must be the same.

If you use difference username, you will need to use the following command. By type the username of the Server as remote_username.

ssh remote_username@remote_host
VirtualBox_Ubuntu16.04_03_07_2016_16_01_58 - Copy

When you connect to the Server, you will need to type the Password to login. If you want to make it more secure, use SSH Key instead of typing your Password.

If you want to exit, just byte exit.

exit

Prepair our stuffs

  • I used Raspberry Pi 3 Model B with Debian Jessie.
  • Connected Raspberry Pi (SSH-Server) to the same network as your computer (SSH-Client) that want to use to remote access to Raspberry Pi

Remarks

  • By default, Raspberry Pi already have SSH-Server installed.
  • Sometime you need to enable SSH.
  • If you test with Ubuntu, you need to install SSH-Server first, by using this command
  • sudo apt-get install openssh-server

Access via Windows

For Windows user, you need to install software first. The most popular software for Unix-like on Windows is PuTTY and we will use it.

  • Login name : pi (your username)
  • Password : raspberry (your password)
  • If you use it for the first time, it will ask you to continue. Just type yes to continue.
  • That’s it !

Access via Windows 10

Since Windows 10 added Linux Bash feature (Windows Subsystem for Linux(WSL)) (like Cygwin), we able to use Linux Command like Linux and macOS but it only Beta version. If you want to try, you have to take a risk yourself.

For this feature, you need to have at least Windows 10 build 14316 and enable Insider Preview build. This will work with 64bit version only.

Remarks : I used Windows 10 Pro Insider Preview Build 14379.rs1_release.160627–1607

Check Windows 10 version first !

You must have at least build 14316 version.

  • Go to Run and type winver at Open:
Image20160704-222430
  • About Windows will appear and you can check your Windows details.
  • If anyone have the version early than build 14316, you need to update first.
  • If you already updated but it’s not appear,try to restart.

Enable Developer Mode

  • Go to Settings menu and select Update & Security > For Developers > Developer Mode (On)
  • Go to Control Panel and select Programs > Turn windows features on or off > Windows Subsystem for Linux (Beta)
  • Open Bash on Ubuntu on Windows (Ubuntu Terminal)
  • Type command ssh
ssh pi@192.168.1.102
  • pi is a username, change it to your username.
  • 192.168.1.102 is my Raspberry Pi IP Address, change it to your IP Address.
  • Password : raspberry (your password)
  • If you use it for the first time, it will ask you to continue. Just type yes to continue.
  • That’s it !

Access via Linux (Ubuntu)

This is for Linux every versions but the one I use is Ubuntu 16.04.

  • Open the Terminal
  • Type command ssh
ssh pi@192.168.1.102
  • pi is a username, change it to your username.
  • 192.168.1.102 is my Raspberry Pi IP Address, change it to your IP Address.
VirtualBox_Ubuntu16.04_03_07_2016_16_01_58
  • Password : raspberry (your password)
  • If you use it for the first time, it will ask you to continue. Just type yes to continue.
  • That’s it !
VirtualBox_Ubuntu16.04_03_07_2016_16_02_14

Access via macOS

This is for macOS every versions but the one I use is OS X Yosemite 10.10.5.

  • Open the Terminal
  • Type command ssh
ssh pi@192.168.1.102
  • pi is a username, change it to your username.
  • 192.168.1.102 is my Raspberry Pi IP Address, change it to your IP Address.
Screen Shot 2559-07-03 at 4.24.18 PM (Medium)
  • Password : raspberry (your password)
  • If you use it for the first time, it will ask you to continue. Just type yes to continue.
  • That’s it !

Access via iOS

On iPhone or iPad, we need to install the application first. We will use the one called “iTerminal”.

  • Install the application iTerminal.
  • Fill in the information as the sample below
  • Host name : 192.168.1.102 (Your Raspberry Pi’s IP Address)
  • Port : 22
  • Username : pi (Your Raspberry Pi’s Username)
  • Password : raspberry (Your Raspberry Pi’s Password)
  • Click on Connect button to start the communication.
  • If you use it for the first time, it will ask you to continue. Just type yes to continue.
  • That’s it !
IMG_1087
  • I do a little test on virtual keyboard and it’s work fine!

Access via Android

On Android, we need to install the application first (as same as the iOS). We will use the one called “JuiceSSH — SSH Client “.

  • Install the application JuiceSSH — SSH Client .
  • Create the New Connection and fill in the information as the sample below
  • Host name : 192.168.1.102 (Your Raspberry Pi’s IP Address)
  • Port : 22
  • Username : pi (Your Raspberry Pi’s Username)
  • Password : raspberry (Your Raspberry Pi’s Password)
  • Click on Connect button to start the communication.
  • That’s it !

Access via Chrome

This is for Chrome user. I don’t have Chrome book right now, So I will use Chrome Browser instead. We will need to install the application called Secure Shell.

  • At Chrome web store, Search for the Secure Shell app and then install it by click +ADD TO CHROME button.
  • Create the New Connection and fill in the information as the sample below
  • 192.168.1.102 (Your Raspberry Pi’s IP Address)
  • Username : pi (Your Raspberry Pi’s Username)
  • Click on Connect button to start the communication.
  • Password : raspberry (your password)
  • If you use it for the first time, it will ask you to continue. Just type yes to continue.
  • That’s it !

Summarize

  • SSH-Server (RPi)
  • Connect your Raspberry Pi (SSH-Server) with in the same network as your Computer (SSH Client)
  • By default, Raspbian (Raspberry Pi’s OS) already have SSH-Server and enabled.
  • If you use other Linux, you might need to install SSH-Sever fist. Easily install by the following command.
  • sudo apt-get install openssh-server
  • SSH-Client
  • The basic command for Unix-like OS (Linux,macOS) is
  • ssh remote_username@remote_host
  • On Windows, we will use with PuTTY.
  • On Linux and macOS, we will use native Terminal.
  • On iOS, iPad, we will use with iTerminal application.
  • On Android, we will use with JuiceSSH — SSH Client application.
  • On Chrome, we will use with Secure Shell application.

Refferences

--

--

Sathittham (Phoo) Sangthong
SS Blog

Hi! It's me Phoo! I’m a Software Developer 👨‍💻 , a Startup Entrepreneur 📱 and a Runner 🏃 . Currently, I’m a Co-Founder and CTO of a Startup name “Urbanice”.