Accessing VirtualBox Guests from Host using SSH, WinSCP and Tunnelling



Similar documents
ECT362 Installing Linux Virtual Machine in KL322

Introduction. Installation of SE S AM E BARCODE virtual machine distribution. (Windows / Mac / Linux)

Campus VPN. Version 1.0 September 22, 2008

Secure Shell. The Protocol

Installation Guidelines (MySQL database & Archivists Toolkit client)

File Transfer Examples. Running commands on other computers and transferring files between computers

OCS Virtual image. User guide. Version: Viking Edition

OpenVPN over SSH tunneling

freesshd SFTP Server on Windows

FileCruiser Backup & Restoring Guide

CONNECTING TO DEPARTMENT OF COMPUTER SCIENCE SERVERS BOTH FROM ON AND OFF CAMPUS USING TUNNELING, PuTTY, AND VNC Client Utilities

Installing Proview on an Windows XP machine

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

IN STA LLIN G A VA LA N C HE REMOTE C O N TROL 4. 1

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

Overview. Remote access and file transfer. SSH clients by platform. Logging in remotely

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

WA2192 Introduction to Big Data and NoSQL. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

A SHORT INTRODUCTION TO BITNAMI WITH CLOUD & HEAT. Version

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

JAMF Software Server Installation Guide for Linux. Version 8.6

It is recommended that you use a clean installation of Lion client before upgrading to Lion Server.

Tips for getting started! with! Virtual Data Center!

Virtual Appliance Setup Guide

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

OSPI SFTP User Guide

Personal Virtual Server (PVS) Quick Start Guide

Secure surfing using Ubuntu Server, Putty, Firefox and an SSH Proxy Tunnel by

SSL VPN Setup for Windows

WA1826 Designing Cloud Computing Solutions. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

How to Tunnel Remote Desktop Through SSH on a Windows Computer

NSave Table of Contents

CDH installation & Application Test Report

DVS-100 Installation Guide

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

VHA Innovations Program Future Technology Laboratory. Linux Workstation Remote Desktop Connection Manual

IIS, FTP Server and Windows

Installing and Configuring Lexia Reading Desktop Software

Pearl Echo Installation Checklist

Configuring for SFTP March 2013

Hallpass Instructions for Connecting to Mac with a Mac

Using Internet or Windows Explorer to Upload Your Site

MATLAB on EC2 Instructions Guide

Installing Oracle 12c Enterprise on Windows 7 64-Bit

Using WinSCP to Transfer Data with Florida SHOTS

Miami University RedHawk Cluster Connecting to the Cluster Using Windows

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

ShadowControl ShadowStream

1 Download & Installation Usernames and... Passwords

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

Local Caching Servers (LCS): User Manual

Using VirtualBox ACHOTL1 Virtual Machines

First Steps after Installation Guide

Methods available to GHP for out of band PUBLIC key distribution and verification.

CS5331 Web Security - Assignment 0

Dynamic DNS How-To Guide

User guide. Business

Remote Viewer Recording Backup

WhatsUp Gold v16.1 Installation and Configuration Guide

Introweb Remote Backup Client for Mac OS X User Manual. Version 3.20

Mapping ITS s File Server Folder to Mosaic Windows to Publish a Website

Visualization Cluster Getting Started

INASP: Effective Network Management Workshops

Acronis Backup & Recovery 10 Advanced Server Virtual Edition. Quick Start Guide

Stealth OpenVPN and SSH Tunneling Over HTTPS

How To Restore Your Data On A Backup By Mozy (Windows) On A Pc Or Macbook Or Macintosh (Windows 2) On Your Computer Or Mac) On An Pc Or Ipad (Windows 3) On Pc Or Pc Or Micro

How to use SURA in three simple steps:

Linux Development Environment Description Based on VirtualBox Structure

Requirements Collax Security Gateway Collax Business Server or Collax Platform Server including Collax SSL VPN module

Sharp Remote Device Manager (SRDM) Server Software Setup Guide

Computer Science and Engineering MacOS Cisco VPN Client Installation and Setup Guide

Install and configure SSH server

Local Caching Servers (LCS) February 2015

Active Directory Integration for Greentree

USB HSPA Modem. User Manual

Install FileZilla Client. Connecting to an FTP server

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

Setting Up Scan to SMB on TaskALFA series MFP s.

Secure Web Development Teaching Modules 1. Security Testing. 1.1 Security Practices for Software Verification

Installation Guide. Research Computing Team V1.9 RESTRICTED

Quick Start Guide for VMware and Windows 7

Apple Mac VPN Service Setting up Remote Desktop

Access to HZB internal computers via SSH tunnel with PuTTY (Screenshots Windows 7)

IBackup Drive User Guide

CycleServer Grid Engine Support Install Guide. version 1.25

Quick Deployment Step-by-step instructions to deploy Oracle Big Data Lite Virtual Machine

Aspera Connect User Guide

Configuration Guide. Remote Backups How-To Guide. Overview

Cyclope Internet Filtering Proxy

Eucalyptus User Console Guide

How to use

Cyclope Internet Filtering Proxy. - Installation Guide -

FTP Over SSL (FTPS) Core FTP LE. Installing Core FTP LE"

BioHPC Cloud Storage. portal.biohpc.swmed.edu Updated for

Web Hosting Getting Started Guide

F-Secure Internet Gatekeeper Virtual Appliance

CEFNS Web Hosting a Guide for CS212

Scholastic Reading Inventory Installation Guide

Using SSH Secure Shell Client for FTP

DVS-100 Installation Guide

Transcription:

Accessing VirtualBox Guests from Host using S... 1 Accessing VirtualBox Guests from Host using SSH, WinSCP and Tunnelling By Steven Gordon on Thu, 15/08/2013-3:49pm Previously I described how to setup a virtual network [3] amongst several Linux virtual machines using VirtualBox. VirtualBox provides terminal access to those virtual machines via its own GUI. However I find the VirtualBox GUI is sometimes a bit slow and not as convenient as other terminals (e.g. Gnome Terminal on Ubuntu). In this article I describe some alternatives for connecting to your virtual machines. The include: Using a terminal on the host to access the guest Viewing and copy files to guest using a file explorer (Linux only) Copying files on the command line in Linux/OSX and Windows Copying files using a GUI in Windows Using host web browser to access a guest web server 1. Assumptions I assume you have one (or more) Ubuntu Linux virtual guests installed as per my instructions [3] for setting up a virtual network. Of particular importance, Port Forwarding has been enabled in VirtualBox (see towards bottom of step 4 [4]), forwarding a host port (e.g. 2201) to the guest port 22. This means that when an application on the host connects to port 2201 (and destination address localhost or 127.0.0.1), VirtualBox will forward the original application traffic to port 22 on the corresponding guest. Recall port 22 is for a SSH server (which should already be installed on each virtual machine as "OpenSSH server" was selecting during the install). 2. Accessing Virtual Machine using SSH via a Terminal Open up a terminal in your host system. This is usually the application called Terminal in Linux or OSX; start PuTTY [5] if in Windows. Now connect using the SSH client to localhost and port 2201 (or whichever you choose in Port Forwarding). On the command line that is performed using the -p option. The -l option may also be used to specific the username for the guest login: sgordon@lime:~$ ssh -p 2201 -l network localhost Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-23-virtual i686) * Documentation: https://help.ubuntu.com/ System information as of Fri Jun 21 14:23:35 ICT 2013 System load: 0.16 Processes: 76 Usage of /: 14.4% of 7.47GB Users logged in: 1 Memory usage: 33% IP address for eth0: 10.0.2.15 Swap usage: 0% IP address for eth1: 192.168.1.10

Accessing VirtualBox Guests from Host using S... 2 Graph this data and manage this system at https://landscape.canonical.com/ Last login: Fri Jun 21 13:01:01 2013 from 10.0.2.2 network@client:~$ In Windows using PuTTY when connecting make sure you set the Host Name to localhost and change the Port to 2201. It looks similar to this: Create session in PuTTY to connect to virtual guest SSH server Once connected you are now accessing the virtual guest. 3. Exploring and Sharing Files on the Virtual Machine (Linux only) In Linux and OSX you can use scp in the Terminal to copies files to/from the guest. PuTTY in Windows also supports command line based file copying with pscp. Another alternative is to use WinSCP to copy files in Windows. However it would be nicer to be able to view and copy files using the standard file explorer on the host. The following describes how to do this in Ubuntu Linux using the standard file explorer called Nautilus (it should be similar with other Linux distributions and file explorers). The alternative techniques - scp, pscp and WinSCP - are described later. In Ubuntu Linux (on the host computer) you can also use Nautilus, the default file explorer, to connect to the SSH server on the virtual machine.

Accessing VirtualBox Guests from Host using S... 3 From the File menu, select Connect to server... Change the Type to SSH and then set the following: Server: localhost Port: 2201 Folder: /home/network Username: network Password: network (or whatever you chose) Connect to server using Nautilus Once connected you can manage files on the virtual machine, including copy-and-paste to/from your host machine using the GUI provided by Nautilus.

Accessing VirtualBox Guests from Host using S... 4 Example of Nautilus for viewing folders on a virtual machine 4. Copying Files Between Host and Guest using Command Line (Linux, OSX) If you can't or don't want to use the file explorer in your host to copy files, then you can use the command line. On most Linux/Unix systems (including OSX), scp can be used in a terminal on the host. The general format is to specified the source and destination, where one of them (depending which direction you are copying) includes the remote address. To copy a file example.txt in your current directory on the host to the guest use the following. Note that you indicate the port using the -P option and the guest username is given before the @ character. $ scp -P 2201 example.txt network@localhost:/home/network/ example.txt 100% 6 0.0KB/s 00:00 And to copy a file index.html in the users tmp diretory on the guest to the host: $ scp -P 2201 network@localhost:/home/network/tmp/index.html. index.html 100% 177 0.2KB/s 00:00 5. Copying Files Between Host and Guest using Command Line (Windows: PuTTY) In Windows, you can use pscp.exe (which is included with PuTTY) in a similar manner to scp (see above). If you expect to use it in a regular basis, then set the path. Instructions for setting the path in Windows, and for using pscp.exe are given in the PuTTY manual [6]. See below if you'd prefer to use a GUI in Windows, instead of the command line.

Accessing VirtualBox Guests from Host using S... 5 6. Copying Files Between Host and Guest using WinSCP (Windows only) WinSCP [7] is a free, open source Windows application that provides a GUI to transfer files to/from a SSH server, i.e. between host and guest. Download, install and the connect to the server as below: Connect to SSH server on guest with WinSCP 7. Using the Host Web Browser to Access a Guest Web Server The default setup of the virtual network uses only terminal access on the guests. There is no GUI or window manager on the guests. That makes using a web browser on a guest difficult: you are restricted to a terminal based text browser like Lynx. If you want to run a full web browser, like Firefox, on a guest then a full desktop environment needs to be installed on that guest. This takes up a lot of disk space and may also require more RAM for the guest. An alternative is to use the web browser on your host to access the web servers on your guests. It involves SOCKS [8] tunnelling. Lets go straight into how to do it, with an explanation of how it works later. On your host, connect to the guest using SSH and a special tunnelling option. With ssh on the command line in Linux/OSX, this is performed using the -N and -D options: $ ssh -ND 3333 -p 2201 -l network localhost After entering the password there will be no visual response - leave this terminal open.

Accessing VirtualBox Guests from Host using S... 6 Now in your web browser preferences/settings, you need to enable proxying specifically using SOCKS. In Ubuntu Firefox, go to Edit menu and select Preferences. From the Advanced icon select the Network tab and press the Settings button. This lets you to set a proxy. Choose Manual proxy configuration and set the SOCKS Host to localhost and the Port to 3333 (or whatever you selected when starting ssh with the -ND option). It should look similar to the following: Firefox proxy settings to tunnel to virtual guest Now your host web browser will connect to the SSH client on the host, which in turn is connected to the SSH server on the guest. All of your host web browser traffic will go via the guest. In your web browser address bar, type in the IP address of the guest, e.g. 192.168.1.1. You should see the web page offered by that guests web server.

Accessing VirtualBox Guests from Host using S... 7 This should work with most host operating systems and browsers, so long as the browser supports SOCKS proxies. If using Windows, since ssh is not available on the command line, you need to use PuTTY. Some instructions on using PuTTY for the SOCKS tunnelling are here [9]. Content: Howto [10] Interest: Firefox [11] Ubuntu Linux [12] Virtual Machines [13] VirtualBox [14] Source URL: Links: [1] [2] http://sandilands.info/sgordon/user/2 [3] http://sandilands.info/sgordon/creating-a-virtual-network-of-linux-guests-using-virtualbox [4] http://sandilands.info/sgordon/creating-a-virtual-network-of-linux-guests-using-virtualbox#portforwarding [5] http://www.chiark.greenend.org.uk/~sgtatham/putty/ [6] http://the.earth.li/~sgtatham/putty/0.63/htmldoc/chapter5.html#pscp [7] http://winscp.net/ [8] http://en.wikipedia.org/wiki/socks [9] http://gbar.dtu.dk/wiki/socks_proxy_with_putty [10] http://sandilands.info/sgordon/taxonomy/term/212 [11] http://sandilands.info/sgordon/taxonomy/term/318 [12] http://sandilands.info/sgordon/taxonomy/term/302 [13] http://sandilands.info/sgordon/taxonomy/term/326 [14] http://sandilands.info/sgordon/taxonomy/term/328