SSH Tutorial. A. Andreatos Div. of Computer Engineering & Information Science Hellenic Air Force Academy GREECE aandreatos @ gmail.

Similar documents
SSH and FTP on Ubuntu WNYLUG Neal Chapman 09/09/2009

INASP: Effective Network Management Workshops

Accessing VirtualBox Guests from Host using SSH, WinSCP and Tunnelling

Livezilla How to Install on Shared Hosting By: Jon Manning

Connecting to the School of Computing Servers and Transferring Files

Instructions for Accessing the Advanced Computing Facility Supercomputing Cluster at the University of Kansas

Guide to the Configuration and Use of SFTP Clients for Uploading Digital Treatment Planning Data to IROC RI

Laboration 3 - Administration

VCL Access. VCL provides access to Linux and Windows 7 Virtual Machines. Users will only see those images that they are authorized to access.

Adafruit's Raspberry Pi Lesson 6. Using SSH

sftp - secure file transfer program - how to transfer files to and from nrs-labs

CASHNet Secure File Transfer Instructions

WinSCP PuTTY as an alternative to F-Secure July 11, 2006

Configure Backup Server for Cisco Unified Communications Manager

Creating a DUO MFA Service in AWS

Creating a Website with MS Publisher

NAS 109 Using NAS with Linux

CDH installation & Application Test Report

Accessing your Staff (N and O drive) files from off campus

Rstudio Server on Amazon EC2

Back Up Linux And Windows Systems With BackupPC

2 Advanced Session... Properties 3 Session profile... wizard. 5 Application... preferences. 3 ASCII / Binary... Transfer

INSTALLING MALTED 3.0 IN LINUX MALTED: INSTALLING THE SYSTEM IN LINUX. Installing Malted 3.0 in LINUX

Adafruit's Raspberry Pi Lesson 7. Remote Control with VNC

MATLAB on EC2 Instructions Guide

SI455 Advanced Computer Networking. Lab2: Adding DNS and Servers (v1.0) Due 6 Feb by start of class

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

Extending Remote Desktop for Large Installations. Distributed Package Installs

Using Internet or Windows Explorer to Upload Your Site

M2M Series Routers. Port Forwarding / DMZ Setup

Local Caching Servers (LCS) February 2015

Using VirtualBox ACHOTL1 Virtual Machines

HOWTO: Set up a Vyatta device with ThreatSTOP in bridge mode

SETTING UP A LAMP SERVER REMOTELY

Desktop : Ubuntu Desktop, Ubuntu Desktop Server : RedHat EL 5, RedHat EL 6, Ubuntu Server, Ubuntu Server, CentOS 5, CentOS 6

Linux Development Environment Description Based on VirtualBox Structure

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

VM-Series Firewall Deployment Tech Note PAN-OS 5.0

How to use FTP Commander

Setting up VNC, SAMBA and SSH on Ubuntu Linux PCs Getting More Benefit out of Your Local Area Network

How to connect to the University of Exeter VPN service

Guide to the Configuration and Use of SFTP Clients for Uploading Digital Treatment Planning Data to ITC

Quick Start Guide. Cerberus FTP is distributed in Canada through C&C Software. Visit us today at

Mesa DMS. Once you access the Mesa Document Management link, you will see the following Mesa DMS - Microsoft Internet Explorer" window:

Network Setup Guide. 1 Glossary. 2 Operation. 1.1 Static IP. 1.2 Point-to-Point Protocol over Ethernet (PPPoE)

CCProxy. Server Installation

Introduction Connecting Via FTP Where do I upload my website? What to call your home page? Troubleshooting FTP...

c. Securely insert the Ethernet cable from your cable or DSL modem into the Internet port (B) on the WGT634U. Broadband modem

Oracle Managed File Getting Started - Transfer FTP Server to File Table of Contents

File Transfer Protocol (FTP) Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Fall 2007, TAIWAN

Ulteo Open Virtual Desktop Installation

Secure Shell. The Protocol

Step One: Installing Rsnapshot and Configuring SSH Keys

Motorola TEAM WS M Configuring Asterisk PBX Integration

INSTALL ZENTYAL SERVER

Instructions for setting up the network connection in the studnet of Studentenwerk Leipzig

Workshop on Scientific Applications for the Internet of Things (IoT) March

VPN User Guide: Own Device (Windows) Staff: Malaysia Campus

Easy Setup Guide 1&1 CLOUD SERVER. Creating Backups. for Linux

Accessing the Media General SSL VPN

Install and configure SSH server

HP SDN VM and Ubuntu Setup

RETRIEVING NMR DATA JB Stothers NMR Facility Materials Science Addition 0216 Department of Chemistry Western University

Comodo MyDLP Software Version 2.0. Installation Guide Guide Version Comodo Security Solutions 1255 Broad Street Clifton, NJ 07013

Remote Access to Unix Machines

ABB solar inverters. User s manual ABB Remote monitoring portal

How to upload large files to a JTAC Case

SMC7004ABR Barricade Broadband Router Installation Instructions

SSH and Basic Commands

Advanced Digital Imaging

Quick Start Guide. Hosting Your Domain

Install FileZilla Client. Connecting to an FTP server

WinSCP: Secure File Transfer Using WinSCP for Secure File Transfer on Windows

Author: Sumedt Jitpukdebodin. Organization: ACIS i-secure. ID: My Blog:

Instructions for Setup and Connecting to Department of Education Secure FTP(SFTP) server January 23, 2013

Accessing the FTP Server - User Manual

SparkLab May 2015 An Introduction to

Using TU Eindhoven's VPN with Ubuntu 14.04

Upgrading Redwood Engine Software. Version 2.0.x to 3.1.0

Comtrend 1 Port Router Installation Guide CT-5072T

Linux Connection Guide. by Tristan Findley

2. PMP New Computer Installation. & Networking Instructions

Installation documentation for Ulteo Open Virtual Desktop

HIG s Remote Desktop Services (RDS) on Linux

IIS, FTP Server and Windows

How to Remotely View Security Cameras Using the Internet

Installation Guide. Research Computing Team V1.9 RESTRICTED

Creating a Website with Publisher 2013

ADSL Router Quick Installation Guide Revised, edited and illustrated by Neo

SSH Secure Client (Telnet & SFTP) Installing & Using SSH Secure Shell for Windows Operation Systems

GENERAL FILE TRANSFER GUIDELINES

freesshd SFTP Server on Windows

Using Microsoft Expression Web to Upload Your Site

Raspberry Pi Setup Tutorial

EZblue BusinessServer The All - In - One Server For Your Home And Business

Transcription:

SSH Tutorial A. Andreatos Div. of Computer Engineering & Information Science Hellenic Air Force Academy GREECE aandreatos @ gmail.com 1

Aim The aim of this tutorial is to show the basics of SSH. In particular, we are going to see the connection to a remote server with the ssh ptrotocol and the transfer of files from our laptop to the server and vice-versa, using the get and put commands of sftp. In addition, we shall see some auxiliary commands of sftp; finally we shall show how to start-up a graphics application such as Firefox, running on the server for safety. 2

How to use this tutorial We have tried to make this a hands-on tutorial. Try to execute the commands on your own; you can copy the text and modify it using your data [IP address, usernames]. Underlined words provide links to theoretical articles on selected topics from Wikipedia. Click to read more about them. Bibliography in the end provides you with more information on specific topics. 3

Essential prerequisites: Prerequisites Linux/Unix commands [ls, pwd, cd, nano, ping, etc.] Basic Networking concepts [IP address, NAT, RTT, public and private keys]. Desirable prerequisites [will help better understanding]: cryptography [key fingerprint, RSA, key's random art image]. This tutorial may be used in a Networking, cryptography or Linux course/ lab in tertiary education. 4

Installation If the ssh client and/or server are not installed: To install the ssh client: $ sudo apt-get install openssh-client To install the ssh server: $ sudo apt-get install openssh-server To install both ssh client and server at once: $ sudo apt-get install openssh-server openssh-client To test your local ssh server type in a terminal: $ ssh localhost Answer yes to allow connection for the first time 5

Enable local SSH server to access the Internet Open your browser & connect to your NAT - capable ASDL modem-router. You can find its local IP address in the manual. Usually it looks like 192.168.1.0 or something similar. Search for a setting containing SSH server. 6

Assumptions LOCAL REMOTE Computer name Amilo-SI Ubuntu1 Username antony user IP address 178.59.212.84 62.217.112.67 You need to know both local and remote passwords. SSH server will be installed on both machines. Note: each time you switch on the DSL modem-router, you are assigned a different external IP address. 7

The simple picture SSH tunnel 8

The real picture: Home network with NAT home network rest of Internet 192.168.1.0/24 192.168.1.0 Internal IP addr 192.168.1.1 SSH tunnel 192.168.1.2 External (public) IP addr, e.g., 138.76.29.7 NAT-capable ADSL router

Procedure We shall present the ssh commands in simple steps. 10

1/ Check connection antony@amilo-si:~$ ping -c 4 62.217.112.67 PING 62.217.112.67 (62.217.112.67) 56(84) bytes of data. 64 bytes from 62.217.112.67: icmp_req=1 ttl=58 time=116 ms 64 bytes from 62.217.112.67: icmp_req=2 ttl=58 time=33.6 ms 64 bytes from 62.217.112.67: icmp_req=3 ttl=58 time=266 ms 64 bytes from 62.217.112.67: icmp_req=4 ttl=58 time=31.3 ms --- 62.217.112.67 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3003ms rtt min/avg/max/mdev = 31.388/111.988/266.291/95.475 ms antony@amilo-si:~$ 11

2/ Find your real IP Address The easiest way: open www.whatismyip.com: 12

Alternative way Open your browser & connect to your NAT - capable ASDL modem-router. You can find the IP address in the manual. Usually it looks like 192.168.1.0 or something similar. Check for info about your broadband or DSL connection. 13

3/ Connect to the remote server antony@amilo-si:~$ ssh user@62.217.112.67 Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-11-generic x86_64) * Documentation: https://help.ubuntu.com/ 38 packages can be updated. 13 updates are security updates. Last login: Sun Oct 9 18:35:44 2011 from 178-212- 84.dynamic.cyta.gr user@snf-916:~$ 14

4/ Connect from server to laptop w. sftp Now we are connected to the server. Next we connect from server to laptop. Laptop IP address is: 178.59.212.84. Hence, now server is the local and laptop is the remote machine. 15

sftp connection sftp antony@178.59.212.84 user@snf-916:~$ sftp antony@178.59.212.84 antony@178.59.212.84's password: Connected to 178.59.212.84. sftp> 16

Helpful sftp commands ls: list contents of remote dir cd: change dir in remote machine pwd: print [show] working dir lls: local ls lcd: local cd lpwd: print local working dir 17

5/ Download file from laptop to server sftp> lpwd Local working directory [server]: /home/user sftp> get /home/antony/images/boats1.jpg /home/user/pictures/ Fetching /home/antony/images/boats1.jpg to /home/user/pictures/boats1.jpg /home/antony/images/boats1.jpg 100% 48KB 48.0KB/s 00:01 sftp> 18

Verification sftp> lcd Pictures sftp> lls a.jpg boats1.jpg sftp> File boats1.jpg has been copied to server's Pictures dir. 19

6/ Upload file from server to laptop put /home/user/pictures/a.jpg /home/antony/images/ sftp> put /home/user/pictures/a.jpg /home/antony/images Uploading /home/user/pictures/a.jpg to /home/antony/images/a.jpg /home/user/pictures/a.jpg 44.1KB/s 00:00 sftp> pwd 100% 44KB Remote working directory: /home/antony/images sftp> ls a.jpg sftp> quit boats1.jpg brain.gif 20

Open user@snf-916:~$ firefox & 21

Some Linux distros like Ubuntu provide option Connect to Server in menu Places. Open this menu and select Service type=ssh, insert the server's IP address in the Server textbox, insert your username in the appropriate box and click Connect. The easy way 22

As a result...... a folder with the contents of the server root dir opens on your desktop 23

...and now you can just... drag and drop files to the networked folder on your desktop, in order to upload or download files to the server! 24

Bibliography Vikas Hazrati (2008), Transferring files between two Ubuntu systems. Posted: Sunday, February 3, 2008. http://vikashazrati.wordpress.com/2008/02/03/quicktiptransferring-files-between-two-ubuntu-systems/ Kimmo Suominen, Getting started with SSH. http://kimmo.suominen.com/docs/ssh/ Downloaded from: http://t-h.wikispaces.com/linux A. Andreatos, Oct.2011 25