Free Powerpoint Templates Working on remote computers by Pedro Henriques June 1, 2012.

Slides:



Advertisements
Similar presentations
SSH SSH is “Secure SHell” Secure, compressed, widely supported, fast Allows both users to get jobs done, and also allows system administrators to sleep.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Introduction to Unix – CS 21 Lecture 10. Lecture Overview Midterm questions Jobs and processes description The foreground and background Controlling jobs.
Lesson 10-Controlling User Processes. Overview Managing and processing processes. Managing jobs. Exiting/quitting when jobs have been stopped.
LINUX System : Lecture 3 (English-Only Lecture) Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University Acknowledgement.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
More Shell Basics CS465 - Unix. Unix shells User’s default shell - specified in /etc/passwd file To show which shell you are currently using: $ echo $SHELL.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
Guide To UNIX Using Linux Third Edition
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 8: Implementing and Managing Printers.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
Virtual Machine and UNIX. What is a VM? VM stands for Virtual Machine. It is a software emulation of hardware. By using a VM, you can have the same hardware.
TCP/IP Tools Lesson 5. Objectives Skills/ConceptsObjective Domain Description Objective Domain Number Using basic TCP/IP commands Understanding TCP/IP3.6.
Amazon EC2 Quick Start adapted from EC2_GetStarted.html.
Telnet/SSH: Connecting to Hosts Internet Technology1.
2440: 141 Web Site Administration Remote Web Server Access Tools Instructor: Enoch E. Damson.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
Linux Filesystem Management
Computation for Physics 計算物理概論 Introduction to Linux.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
1 Intro to Linux - getting around HPC systems Himanshu Chhetri.
CSN08101 Digital Forensics Lecture 1B: Essential Linux and Caine Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak.
Chapter 10 Networking and the Internet ITSC 1458.
Basic unix commands that everyone should know (Even if you have a mac) Slightly more advanced:
UNIX command line. In this module you will learn: What is the computer shell What is the command line interface What is the directory tree Some UNIX commands.
| nectar.org.au NECTAR TRAINING Module 5 The Research Cloud Lifecycle.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
1 INFO 321 Server Technologies II FTP Material adapted from Dr. Randy Kaplan.
Find Find basics. find ~ -name myfile –print find directory criteria This will search the home directory (~) looking for files.
AE6382 Secure Shell Usually referred to as ssh, the name refers to both a program and a protocol. The program ssh is one of the most useful networking.
Network Security: Lab#3 Transport-Level Security Tools J. H. Wang May 12, 2011.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
Internet Business Foundations © 2004 ProsoftTraining All rights reserved.
Integrating and Troubleshooting Citrix Access Gateway.
Networking in Linux. ♦ Introduction A computer network is defined as a number of systems that are connected to each other and exchange information across.
Introduction to Programming Using C An Introduction to Operating Systems.
1 Lecture 6 Introduction to Process Management COP 3353 Introduction to UNIX.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
Free Powerpoint Templates Page 1 Free Powerpoint Templates Users and Documents.
| nectar.org.au NECTAR TRAINING Module 5 The Research Cloud Lifecycle.
– Introduction to the Shell 1/21/2016 Introduction to the Shell – Session Introduction to the Shell – Session 3 · Job control · Start,
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
Agenda Managing Processes (Jobs) Command Grouping Running jobs in background (bg) Bringing jobs to foreground (fg), Background job status (jobs) Suspending.
Agenda The Bourne Shell – Part I Redirection ( >, >>,
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
SSH. 2 SSH – Secure Shell SSH is a cryptographic protocol – Implemented in software originally for remote login applications – One most popular software.
1 CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
Chapter 7: Using Network Clients The Complete Guide To Linux System Administration.
Windows Server 2003 { First Steps and Administration} Benedikt Riedel MCSE + Messaging
slides created by Marty Stepp, modified by Josh Goodwin
FTP Lecture supp.
FTP - File Transfer Protocol
Unit 27: Network Operating Systems
Telnet/SSH Connecting to Hosts Internet Technology.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
SSH SSH is “Secure SHell” Secure, compressed, widely supported, fast
slides created by Marty Stepp, modified by Jessica Miller
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Remote Computing Services Cloud connection Distributed system
slides created by Marty Stepp, modified by Jessica Miller
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Chapter 7 Network Applications
Lecture 6 Introduction to Process Management
Presentation transcript:

Free Powerpoint Templates Working on remote computers by Pedro Henriques June 1, 2012

Connecting to a remote computer Clients Servers Internet

Connecting to a remote computer Typical scenarios for remote access: 1. Running analysis on a large cluster 2. Checking in on a lab computer from home

Connecting to a remote computer Running analysis on a large cluster… Low computational power High computational power Data Results

Connecting to a remote computer Checking in on a lab computer from home… Internet

Connecting to a remote computer Internet Protocol Address - IP IPv4 IPv unique addresses 2 32 unique addresses

Connecting to a remote computer Web server DNS server nature.com

Connecting to a remote computer myhost:~ lucy$ host has address myhost:~ lucy$ host has address myhost:~lucy$ host in-addr.arpa domain name pointer pismo.shore.mbari.org. myhost:~lucy$ host in-addr.arpa domain name pointer pismo.shore.mbari.org. “ host ” command “ whois ” command whois –h whois.arin.net localhost - computer you are logged onto the moment (always )

Connecting to a remote computer Security 1.Never give your password to anyone (not even system administrators) 2.Don’t enable any network protocols or services that aren’t essencial 3.Make sure that all software is up to date 4.Use encrypted connections (e.g. VPN) 5.Avoid connecting to servers over open network connections without encryption (e.g. public WiFi)

Secure command-line connections “ ssh ” (secured shell) command Creates an encrypted connection between your client computer and the remote server Login Remote computer’s address Username Password ssh ********** (password) ssh ********** (password) Accept new key – allows the two computers to set up na encrypted communication

Secure command-line connections echo $SHELL Remote computers may use a different shell than bash Same command-line tools ( mkdir, cd, ls …)

Transfering files between computers myhost:~ lucy$ tar –cf ~/Desktop/scripts_31Mai2012.tar ~/scripts man zip Sometimes it’s easyer to compress all files and send them as one… …and if zip is not available in the remote conmputer “ tar ” command – creating a tarball One or more entries, separated by spaces File archiving and compression

Transfering files between computers myhost:~ lucy$ gzip ~/Desktop/scripts_31Mai2012.tar “ gzip ” command – file compression Creates a.tar.gz smaller file and deletes the old one “ gunzip ” command – file uncompression myhost:~ lucy$ cd ~/Desktop myhost:~ lucy$ gunzip scripts_31Mai2012.tar.gz myhost:~ lucy$ tar –xvf scripts_31Mai2012.tar myhost:~ lucy$ cd ~/Desktop myhost:~ lucy$ gunzip scripts_31Mai2012.tar.gz myhost:~ lucy$ tar –xvf scripts_31Mai2012.tar Expand indicated file archieve

Transfering files between computers “ sftp ” (secured file transfer program) command Transfer files over a ssh connection 1.Move to the directory in the local machine where you want to send or recieve files myhost:~ lucy$ sftp Connecting to pacticalcomputing.org... password: ******** sftp> ls myhost:~ lucy$ sftp Connecting to pacticalcomputing.org... password: ******** sftp> ls

Some common commands when using sftp CommandUsage cd Change directories on the remote machine get A B Download file A from remote machine and save as B locally put B A Upload file B from the local machine to the remote file A lcd Change directories on the local machine !ls List of the files on the local machine !command Perform the specified shell command on the local machine exit Close the sftp connection Transfering files between computers

“ scp ” (secure remote copy) command scp localfile Move to the appropriate local directory before runnung the command scp localfile.txt For downloading… …and uploading

Full GUI control of a remote computer with VNC VNC – Virtual Network Computing Access to the complete graphical user interface (GUI) of a remote computer

Full GUI control of a remote computer with VNC OS X Screen sharing Remote Management WindowsRealVNC LinuxAvailable in the OS Client Server OS XGo Connect to Server vnc:// serveraddress

Troubleshooting remote connections Getting local with a Virtual Private Network (VPN) Institute or University Campus VPN (encrypted) Elsewhere Credential verification

Troubleshooting remote connections Mapping network connections “ traceroute ” command Trace the network steps between your system and na address traceroute remoteaddress

Troubleshooting remote connections Configuring the backspace key Sometimes the backspace key can behave differenly between machines ( ^H ) “ stty ” command stty erase ‘^H’

Controling how programs run On regular computers host:~lucy$ sleep 15 ls host:~lucy$ sleep 15 ls “ sleep ” command Does nothing for a specified number of seconds, and then stops Any command typed while sleep is running will be run after it quits

Controling how programs run Terminating a process “ ^C ” (ctrl + C) command Tries to terminate a program that is active in the command line host:~lucy$ sleep 1000 Typing ^C will end the sleep program and you will get your shell back

Controling how programs run Starting jobs in the background “ & ” command Runs the program in the backgroud, enabling the use of the shell host:~lucy$ sleep 15 & [1] 4990 host:~lucy$ host:~lucy$ sleep 15 & [1] 4990 host:~lucy$ sleep is running in the background as job number [1] and process ID 4990

Controling how programs run Checking job status “ ps ” command Gives a snapshot of current processes host:~lucy$ sleep 15 & [2] 4992 host:~lucy$ ps 4800 ttys001 0:00.02 –bash 4992 ttys001 0:00:00 sleep 15 host:~lucy$ sleep 15 & [2] 4992 host:~lucy$ ps 4800 ttys001 0:00.02 –bash 4992 ttys001 0:00:00 sleep 15 Process identifier (PID) ps -A Full list of everything your computer is doing

Controling how programs run Checking job status “ top ” command Real-time view of the same list as ps top –o command The –o modifier specifies by what parameter you want to sort Options for the top command top –o Sort by the parameter that follows; default is PID top -u Sort bu CPU usage; useful for detecting runaway processes ? While top is running, show a list of display options q While top is running, quit

Controling how programs run Suspending jobs and sending them to the background “ ^Z ” (ctrl + Z) command Suspends na operation already running host:~lucy$ sleep 15 ^Z [1]+ Stoppedsleep 15 host:~lucy$ ps PID TTY TIME CMD 5760 ttys001 0:00.02 –bash 5954 ttys001 0:00:00 sleep 15 host:~lucy$ sleep 15 ^Z [1]+ Stoppedsleep 15 host:~lucy$ ps PID TTY TIME CMD 5760 ttys001 0:00.02 –bash 5954 ttys001 0:00:00 sleep 15

Controling how programs run Suspending jobs and sending them to the background “ jobs ” command Lists all the background processes host:~lucy$ sleep 20 & [2] 5989 host:~lucy$ jobs [1]+ Stoppedsleep 15 [2]- Runningsleep 20 & host:~lucy$ sleep 20 & [2] 5989 host:~lucy$ jobs [1]+ Stoppedsleep 15 [2]- Runningsleep 20 & “ bg ” command Resumes a frozen job host:~lucy$ bg 1 [1]+ sleep 15 & [2] Donesleep 20 host:~lucy$ bg 1 [1]+ sleep 15 & [2] Donesleep 20

Controling how programs run Stopping processes “ kill ” command Terminates any process (even running in the background) When a process is running in the background, it will be impervious to interruptions by the ^C command host:~lucy$ sleep 60 & [1] 5563 host:~lucy$ ps PID TTY TIME CMD 5089 ttys000 0:00.06 –bash 5563 ttys000 0:00:00 sleep 60 host:~lucy$ kill 5063 host:~lucy$ ps PID TTY TIME CMD 5089 ttys000 0:00.06 –bash [1]+ Terminatedsleep 60 host:~lucy$ sleep 60 & [1] 5563 host:~lucy$ ps PID TTY TIME CMD 5089 ttys000 0:00.06 –bash 5563 ttys000 0:00:00 sleep 60 host:~lucy$ kill 5063 host:~lucy$ ps PID TTY TIME CMD 5089 ttys000 0:00.06 –bash [1]+ Terminatedsleep 60

Controling how programs run Stopping processes When kill doesn’t work… sudo kill The -9 parameter will force the program to quit The combined effect with sudo is lethal

Controling how programs run Keeping jobs alive When you leave the shell, all processes are terminated with it (even the ones in the background) “ nohup ” (no hang-up) command Indicates that the program should keep running even when the shell is terminated nohup phrap infile.sff –new_ace > log.txt 2> /dev/null < /dev/null & Redirects the output file to log.txt Sends any error messagens to an imaginary place called /dev/nulll

Controling how programs run Keeping jobs alive There is also a way to modify a process after it has started so that it doesn’t terminate when the shell closes… disown -h 1.Suspend the process with ^Z command 2.Send it to the backgroung using bg 1 (or whatever job is reported) 3.Use the disown command to release it from the shell It can still terminate due to output errors!

Controling how programs run Changing program priority “ renice ” command Adjusts the priority of each process for processor power host:~lucy$ ps PID TTY TIME CMD ttys000 0:00.01 –bash ttys000 0:00:06 traxm1HPC –b 13 -# host:~lucy$ renice host:~lucy$ ps PID TTY TIME CMD ttys000 0:00.01 –bash ttys000 0:00:06 traxm1HPC –b 13 -# host:~lucy$ renice Priority ranging from -20 (highest) to 19 (lowest)

High-performannce computing Job management tools on clusters It takes care of issues like priority management and shell termination Processes will be terminated if they take too long A configuration file with the analysis needs to be sent to the job manager

Setting up a server Install and configure server software for the device you want to provide (ssh, web server…) Configure the firewall on the server to allow access to the service you will provide Make sure your local network allows connections to computers from the outside world Get na IP address or hostname of your server so that other computers can find it

Setting up a server Configuring the ssh server System preferences Sharing pane Remole login (check)

Setting up a server Finding your address echo $HOSTNAME host:~lucy$ host $HOSTNAME Most likelly your IP address will change (hours/days) Use the system name returned by $HOSTNAME Request a fixed IP to your network administrator