User Tools

Site Tools


docs:guide-quick-start:sshadministration

SSH Access for Newcomers

This wiki describes several terminal emulators to initiate a SSH connection on BSD/MacOS, Linux, and Windows

  • To SSH into your router with OpenSSH, issue:
    ssh root@192.168.1.1
    • Default Port: 22
    • Password Set: enter root's password when prompted
    • Password not Set: press [ENTER] and once logged in, issue passwd

  • The first time you SSH into your router, you will see a warning about the SSH server's RSA key fingerprint
    The authenticity of host '192.168.1.1 (192.168.1.1)' cannot be established.
    RSA key fingerprint is SHA256:4VbDA/MOc7inPiyllF5f0r3Q6iEx89ddKdhLGBovsiY.
    Are you sure you want to continue connecting (yes/no)? yes
    • If you are certain this is the address of your OpenWrt router, type yes, then press [ENTER]
      Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.
      • This will add the SSH server's fingerprint to your known hosts file:
        • BSD/Linux:
          • OpenSSH: ~/.ssh/known_hosts
          • PuTTY: ~/.putty/sshhostkeys

        • Windows:
          • OpenSSH: %UserProfile%\.ssh\known_hosts
          • PuTTY: HKCU\Software\SimonTatham\PuTTY\SshHostKeys

    • To end your SSH session, type exit, then press [ENTER]

Example

$ ssh root@192.168.1.1
 
The authenticity of host '192.168.1.1 (192.168.1.1)' cannot be established.
RSA key fingerprint is SHA256:4VbDA/MOc7inPiyllF5f0r3Q6iEx89ddKdhLGBovsiY.
Are you sure you want to continue connecting (yes/no)? yes
 
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.
root@192.168.1.1 password:
 
BusyBox v1.28.3 () built-in shell (ash)
Enter 'help' for a list of built-in commands.
 
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt (18.06.1 r7324-05606de1aa)
 -----------------------------------------------------
 
root@OpenWrt:~ #

BSD/MacOS

ssh_config

  • All UNIX-based distributions provide a command-line SSH client as part of the default installation
    • Terminal is the MacOS default (location: /Applications/Utilities )
    • iTerm2 is an enhanced terminal program

    • It's recommended to read the integrated manual for the program(s)
      • Terminal: man scp or man ssh
      • Search Engine: scp man page or ssh man page

Linux

ssh_config

  • All UNIX-based distributions provide a command-line SSH client as part of the default installation
    • The distro's documentation or package management may need to be queried for proper syntax
    • It's recommended to read the integrated manual for the program(s)
      • Terminal: man scp or man ssh
      • Search Engine: scp man page or ssh man page

Windows

Win32-OpenSSH Wiki ssh_config

  • Cmder, ConEmu, SmarTTY, PuTTY, and WinSCP are terminal emulators for SSH connections
    • OpenSSH has been ported over to Windows by Microsoft
      • Installation should be pulled directly from Microsoft's Win32-OpenSSH GitHub

Cmder

cmder

  • Cmder for Windows is an open-source terminal emulator for Windows, built upon ConEmu
    • Full distribution is preferred over the mmini, as it provides bash emulation and a Unix commands

    1. Download, and once installed, open Cmder
    2. Issue: ssh root@192.168.1.1
      1. Enter password if set
      2. Done: you are now logged into the OpenWrt command line

ConEmu

Clink ConEmu Wiki config

  • ConEmu is feature rich & fully customizable, capable of hosting any application developed for:
    • WinAPI: choco, cmd, far, git, powershell, etc.
    • Unix PTY: bash, cygwin, git-bash, msys, wsl bash, etc.

    1. Download, and once ConEmu & CLink are installed, open ConEmu
      • Install CLink to %ProgramFiles%\ConEmu\ConEmu\clink\
    2. ConEmu auto opens the Create New Console window
      1. Select {Shells::PowerShell} from drop down, then press [ENTER]
    3. Issue: ssh root@192.168.1.1
      1. Enter password if set
      2. Done: you are now logged into the OpenWrt command line

PuTTY

PuTTY Config

  • PuTTY provides command line access to OpenWrt via SSH and other methods

    1. Download, and once installed, open PuTTY
      1. Session Category
        1. Host Name (or IP): root@192.168.1.1
        2. Port: 22
      2. Click Open
        1. Enter password if set
        2. Done: you are now logged into the OpenWrt command line

SmarTTY

SmarTTY

CA/Cert listed as untrusted: No guarantee program's downloadable files have not been tampered with

  • SmarTTY is a more modern and user-friendly terminal emulator than PuTTY

    1. Download, and once installed, open SmarTTY
    2. Choose Setup a New SSH Connection
      1. Host name: 192.168.1.1
      2. User Name: root
      3. Password: Enter root's password, else leave blank
    3. Click Connect
      1. Configure for SCP, in lieu of SFTP
      2. Click File Open a Remote File
        • Allows navigation of the OpenWrt filesystem and editing of config files
      3. To upload/download files to/from OpenWrt, click on the SCP menu

WinSCP

WinSCP

  • WinSCP allows browsing of the OpenWrt file system in an Explorer-like GUI

    1. Download, and once installed, open WinSCP
    2. Click New Site on left, then enter:
      1. File Protocol: SCP
      2. Host name: 192.168.1.1
      3. User name: root
      4. Password: Enter root's password, else leave blank
    3. Click Login
      1. Enter password if set
      2. Done: you now have an Explorer-like view of the OpenWrt filesystem
      • To edit files, right-click file in WinSCP, select Edit from the context menu
docs/guide-quick-start/sshadministration.txt · Last modified: 2018/11/13 14:39 by jw0914