FEEG6002 - Applied Programming 6 - Working Remotely on Linux Server

Similar documents
Editing Files on Remote File Systems

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor

Remote Access to Unix Machines

Linux Connection Guide. by Tristan Findley

University of Toronto

Introduction to Mac OS X

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

How To Run Linux On Windows 7 (For A Non-Privileged User) On A Windows 7 Computer (For Non-Patty) On Your Computer (Windows) On An Unix Computer (Unix) On Windows) On The Same

Accessing VirtualBox Guests from Host using SSH, WinSCP and Tunnelling

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

Tutorial Guide to the IS Unix Service

PuTTY/Cygwin Tutorial. By Ben Meister Written for CS 23, Winter 2007

HPCC - Hrothgar Getting Started User Guide

SSH and Basic Commands

A Crash Course in OS X D. Riley and M. Allen

IDS and Penetration Testing Lab II

Editing Locally and Using SFTP: the FileZilla-Sublime-Terminal Flow

INSTALLING KAAZING WEBSOCKET GATEWAY - HTML5 EDITION ON AN AMAZON EC2 CLOUD SERVER

Secure Shell. The Protocol

Getting Started With Your Virtual Dedicated Server. Getting Started Guide

Getting Started Guide. Getting Started With Your Dedicated Server. Setting up and hosting a domain on your Linux Dedicated Server using Plesk 8.0.

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

Anchor End-User Guide

Remote Desktop Web Access. Using Remote Desktop Web Access

Tutorial: Using HortonWorks Sandbox 2.3 on Amazon Web Services

Miami University RedHawk Cluster Connecting to the Cluster Using Windows

Getting Started With Your Virtual Dedicated Server. Getting Started Guide

PROGRAMMING FOR BIOLOGISTS. BIOL 6297 Monday, Wednesday 10 am -12 pm

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

Cadence Verilog Tutorial Windows Vista with Cygwin X Emulation

Parallels. for your Linux or Windows Server. Small Business Panel. Getting Started Guide. Parallels Small Business Panel // Linux & Windows Server

SSH Connections MACs the MAC XTerm application can be used to create an ssh connection, no utility is needed.

Chapter 9 PUBLIC CLOUD LABORATORY. Sucha Smanchat, PhD. Faculty of Information Technology. King Mongkut s University of Technology North Bangkok

How to Use Remote Desktop over a Secure Connection (SSH)

MobaXTerm: A good gnome-terminal like tabbed SSH client for Windows / Windows Putty Tabs Alternative

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

MATLAB on EC2 Instructions Guide

Tera Term Telnet. Introduction

Parallels Plesk Panel 11 for your Linux server

GETTING STARTED TABLE OF CONTENTS

Agenda. Using HPC Wales 2

How to connect to the University of Exeter VPN service

Distributed convex Belief Propagation Amazon EC2 Tutorial

MFCF Grad Session 2015

WinSCP Tutorial 01/28/09: Y. Liow

Basic File Management & Navigation

Linux Labs: mini survival guide

Enterprise Content Management System Monitor. Server Debugging Guide CENIT AG Bettighofer, Stefan

CS10110 Introduction to personal computer equipment

GeBro-BACKUP. Die Online-Datensicherung. Manual Pro Backup Client on a NAS

Counter-Strike Game Server Management Module

How to remotely access your Virtual Desktop from outside the college using VMware View Client. How to guide

Connecting to the School of Computing Servers and Transferring Files

ICS 351: Today's plan

CUNY TUMBLEWEED (SECURE TRANSPORT) USER GUIDE

Using Windows XP and File Management Handout (Staff)

Creating a DUO MFA Service in AWS

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

UOG User Guide. Windows

Oracle Tutorial. Outline: Login to oracle server Create account Use SQL*PLUS Use SQL Developer (recommended)

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

Comsol Multiphysics. Running COMSOL on the Amazon Cloud. VERSION 4.3a

Cloud Server powered by Mac OS X. Getting Started Guide. Cloud Server. powered by Mac OS X. AKJZNAzsqknsxxkjnsjx Getting Started Guide Page 1

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

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

Vim, Emacs, and JUnit Testing. Audience: Students in CS 331 Written by: Kathleen Lockhart, CS Tutor

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

Zimbra :: The Leader in Open Source Collaboration. Administrator's PowerTip #3: June 21, 2007 Zimbra Forums - Zimbra wiki - Zimbra Blog

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

There s a variety of software that can be used, but the approach described here uses freely available Cygwin software: (1) Cygwin/X (2) Cygwin/openssh

Accessing vlabs using the VMware Horizon View Client for OSX

Seagate NAS OS 4 Reviewers Guide: NAS / NAS Pro / Business Storage Rackmounts

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

Simple. Control Panel. for your Linux Server. Getting Started Guide. Simple Control Panel // Linux Server

Launching and Connecting

RDM+ Remote Desktop for Mobiles For Blackberry Playbook

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

SETTING UP A LAMP SERVER REMOTELY

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

Week Overview. Running Live Linux Sending from command line scp and sftp utilities

Tutorial. Reference for more thorough Mininet walkthrough if desired

Installing an IBM Workplace/Portal Server on Linux

Secure Browser Installation Manual

Author A.Kishore/Sachin VNC Background

Extending Remote Desktop for Large Installations. Distributed Package Installs

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

Navigating the Rescue Mode for Linux

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

THE EDINBURGH NAPIER UNIVERSITY WINDOWS VIRTUAL PRIVATE NETWORK (VPN) GUIDE FOR MAC USERS

ITP 101 Project 3 - Dreamweaver

Lab 8: Configuring Backups

OpenVPN over SSH tunneling

Transcription:

FEEG6002 - Applied Programming 6 - Working Remotely on Linux Server Sam Sinayoko 2015-11-06 1 / 25

Outline Learning Outcomes Introduction Connecting to Linux server Transfering files to Linux server Text editors Sending emails on remote server Summary 2 / 25

Outline Learning Outcomes Introduction Connecting to Linux server Transfering files to Linux server Text editors Sending emails on remote server Summary 3 / 25

Learning outcomes After studying this lecture you should be able to: Connect to a remote linux server with SSH via PuTTY on Windows via the terminal on Linux / OSX Display remote graphical applications on your local screen via X forwarding Edit files on the linux server using nano or emacs Sending files on the linux server using Firefox text editors sending emails on the remote files 4 / 25

Outline Learning Outcomes Introduction Connecting to Linux server Transfering files to Linux server Text editors Sending emails on remote server Summary 5 / 25

Introduction Why remote servers? Websites Supercomputers: Iridis 4, Hector, Archer. Cloud computing: pay for what you use (computing time, memory etc) work anywhere Amazon AWS, Microsoft Azure CD-Adapco: CFD software usable in the cloud Wakari.io: http://www.wakari.io Sage: http://cloud.sagemath.com Why Linux / Unix The most common OS on servers. Can do almost everything from the command line Easy to install new software on 6 / 25

Outline Learning Outcomes Introduction Connecting to Linux server Transfering files to Linux server Text editors Sending emails on remote server Summary 7 / 25

Connecting to Linux server Linux / OS X terminal ssh -X LOGIN@feeg6002.soton.ac.uk where LOGIN is your username on the server. You can only connect to a server where you have an account, and ssh will ask for your password. The -X option forwards graphical applications to the local display. See slide XX. Windows Use an SSH client such as PuTTY: http://www.putty.org/ 8 / 25

Connecting to Linux server Example hostname # display local host name ssh -X ss53g10@feeg6002.soton.ac.uk hostname landade # <- the local server hostname ss53g10@feeg6002.soton.ac.uk s password: Last login: Fri Nov 7 12:43:11 2014 from srv00470.soton.ac ----------------------------------------------------------- System: Red Hat Enterprise Linux Server release 6.5 (Santi Server: srv00470.soton.ac.uk Service: SES Teaching Server Status: Production Purpose: SES Teaching Server ----------------------------------------------------------- srv00470 # <- the remote server hostname 9 / 25

X server > ssh -X Start X server locally before running "ssh -X" "ssh -X" connects the remote server to the local X server. This allows to display remote GUI applications. You can try [login@feeg6002]$ xterm & [login@geeg6002]$ emacs & [login@feeg6002]$ firefox & The "&" is to run the program asynchronously (in the background) so you can keep using the terminal. 10 / 25

Job control Job control 1 If you forget the "&", you can do "Ctrl-Z" to suspend the program. This will display a job number on the screen (say, [1]) and freeze the app, but it will free the terminal. To de-freeze the application, run bg 1 to put it in the background. If you run fg 1 you will put the application back in the foreground. The bg and fg commands are especially useful when using non-graphical programs in the terminal such as nano or emacs. These programs take over the shell but can be put in the background temporarily with "Ctrl-Z" to bring back the shell, and later brought back a little later with fg. This avoids having to quit and restart commands constantly. 1 See http://software-carpentry.org/v4/shell/job.html for more info on "job control". 11 / 25

Installing an X server on the local machine Installing an X server on the local machine Linux: nothing to do (the X server is always running) OS X: may need to download and install X-Quartz (free) http://xquartz.macosforge.org/trac Windows: Exceed (commercial): available on university computers. Xming (free): http://sourceforge.net/projects/xming/ Exceed must be started before running Putty. 12 / 25

Outline Learning Outcomes Introduction Connecting to Linux server Transfering files to Linux server Text editors Sending emails on remote server Summary 13 / 25

University Computer Your filestore directory on the remote server (/home/login/filestore) contains a folder mydocuments in sync with your Windows "My Documents" folder. You can put files in that folder to make them visible on Windows emacs program.c # (edit the program and save) mv file.c /home/login/filestore/mydocuments You can also simply use the GUI Function > Save As and navigate to mydocuments. 14 / 25

Transfering files to Linux server The scp command Works like cp but can copy file to/from remote server securely. Copying file to home directory on remote server # copy file to remote home directory scp file.c LOGIN@feeg6002soton.ac.uk: *Don t forget the trailing colon ":"*. One can give the remote path to # copy file to remote home directory scp file.c LOGIN@feeg6002soton.ac.uk:/remote/path/ 15 / 25

Transfering files to Linux server GUI programs Use one of the many GUI programs for transfering files to remote server: Windows: WinSCP http://winscp.net/eng/index.php OS X: Finder, mucommander http://www.mucommander.com/ Linux: Krusader http://www.krusader.org/ Include your login and the address of the server: ssh.feeg6002.soton.ac.uk 16 / 25

Outline Learning Outcomes Introduction Connecting to Linux server Transfering files to Linux server Text editors Sending emails on remote server Summary 17 / 25

Text editors Non-GUI text editors on server Nano http://www.nano-editor.org/ Run with nano ^X (exit) means Ctrl+X Vim http://www.vim.org/ Run with vim Modal editor: press "I" to start insert mode and "ESC" to get back to command mode. Command mode is for moving around: try h,j,k,l keys, ":help tutor" to start tutorial and ":q" to quit. Run non-gui Emacs with "emacs -nw" (combine with "Ctrl-Z" to suspend, and "fg 1" to use again) GUI text editors on server Emacs: http://www.gnu.org/software/emacs/ Run Emacs with emacs & (see intro in next few slides) 18 / 25

Emacs intro Basics Use the GUI and the menus to get started. In Emacs, "C-" means "Ctrl+" and "M-" means "Alt+". Emacs prints information and reads information in the mini-buffer at the bottom of the screen. Use "M-x COMMAND" to run a command if you know its name. Use TAB for completion. C-x C-f C-x C-s M-x compile M-x eshell M-x cua-mode open or create file save file compile file (type the command you need the first time run the code in eshell make Ctrl-C and Ctrl=V work like on windows 19 / 25

Emacs buffers Emacs can run multiple files and programs (like the emacs terminal eshell) simultaneously. Each file or program is displayed in its own buffer. Switch buffer with C-x b: C-x b display a different buffer in current window The window can also be split to display multiple buffers simultaneously C-x 2 C-x 3 C-x 1 Split buffer horizontally Split buffer vertically Maximize the buffer When doing so, one can switch to another window with C-x o C-x o Switch to other window 20 / 25

Getting help in Emacs In Emacs C-h t C-h r Start the Emacs tutorial Start the emacs manual Online Official website: http://www.gnu.org/software/emacs/ Getting help: http://www.emacswiki.org/ Blog: http://masteringemacs.org/ 21 / 25

Outline Learning Outcomes Introduction Connecting to Linux server Transfering files to Linux server Text editors Sending emails on remote server Summary 22 / 25

Sending emails on remote server firefox Run Firefox on remote remote server with command firefox & and use Outlook Web Access to write and attach email Note: Sometimes firefox detects if it is already running on the local computer, and switches to that application instead of starting a remote one. If that happens Close your local copy of firefox and try again (or run firefox locally with the -no-remote option). 23 / 25

Outline Learning Outcomes Introduction Connecting to Linux server Transfering files to Linux server Text editors Sending emails on remote server Summary 24 / 25

Summary Start X Server on local machine if needed Use "ssh -X LOGIN@feeg6002.soton.ac.uk" to connect to remote server on the command line or with PuTTY on Windows Start coding with your prefered text editor on the server (Emacs, Nano, or Vi). 25 / 25