1 / 37

Free Powerpoint Templates

Working on remote computers. by Pedro Henriques. June 1, 2012. Free Powerpoint Templates. 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.

brac
Download Presentation

Free Powerpoint Templates

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Connecting to a remotecomputer Clients Servers Internet

  3. Connecting to a remotecomputer Typicalscenarios for remoteaccess: 1. Runninganalysison a large cluster 2. Checking in on a labcomputerfromhome

  4. Connecting to a remotecomputer Runninganalysison a large cluster… Data Results Highcomputationalpower Lowcomputationalpower

  5. Connecting to a remotecomputer Checking in on a labcomputerfromhome… Internet

  6. Connecting to a remotecomputer Internet ProtocolAddress - IP 0 - 255 IPv4 232 uniqueaddresses IPv6 2128 uniqueaddresses

  7. Connecting to a remotecomputer DNS server Web server 77.67.27.49 nature.com

  8. Connecting to a remotecomputer “host” command myhost:~ lucy$ host www.nature.com www.nature.com hasaddress 77.67.27.49 myhost:~lucy$ host 134.89.10.74 74.10.89.134.in-addr.arpa domainnamepointer pismo.shore.mbari.org. “whois” command whois –h whois.arin.net 75.119.192.137 localhost - computeryou are loggedontothemoment (always127.0.0.1)

  9. Connecting to a remotecomputer Security Nevergiveyour password to anyone (notevensystemadministrators) Don’tenableany network protocolsorservicesthataren’t essencial Makesurethatall software isup to date Use encryptedconnections (e.g. VPN) Avoidconnecting to servers over open network connectionswithoutencryption (e.g. publicWiFi)

  10. Secure command-lineconnections “ssh” (securedshell) command Createsanencryptedconnectionbetweenyourclientcomputerandtheremote server Login Remotecomputer’saddress Password Username sshusername@address ********** (password) Acceptnewkey– allowsthetwocomputers to set up na encryptedcommunication

  11. Secure command-lineconnections Remotecomputersmay use a differentshellthanbash echo $SHELL Same command-linetools (mkdir, cd, ls…)

  12. Transfering files betweencomputers File archivingandcompression Sometimesit’seasyer to compressall files andsendthem as one… man zip …andif zip isnotavailable in theremoteconmputer “tar” command – creating a tarball myhost:~ lucy$ tar –cf ~/Desktop/scripts_31Mai2012.tar ~/scripts Oneor more entries, separatedbyspaces

  13. Transfering files betweencomputers “gzip” command– file compression myhost:~ lucy$ gzip ~/Desktop/scripts_31Mai2012.tar Creates a .tar.gz smaller file and deletes theoldone “gunzip” command– file uncompression myhost:~ lucy$ cd ~/Desktop myhost:~ lucy$ gunzip scripts_31Mai2012.tar.gz myhost:~ lucy$ tar –xvf scripts_31Mai2012.tar Expandindicated file archieve

  14. Transfering files betweencomputers “sftp” (securedfile transferprogram) command Transfer files over a sshconnection Move to thedirectory in thelocal machinewhereyouwant to sendorrecieve files myhost:~ lucy$ sftp lucy@practicalcomputing.org Connecting to pacticalcomputing.org... lucy@practicalcomputing.org’s password: ******** sftp> ls

  15. Transfering files betweencomputers

  16. Transfering files betweencomputers “scp” (secure remotecopy) command Move to theappropriate local directorybeforerunnungthecommand For downloading… scpuser@hostname:directory/remotefilelocalfile …anduploading scplocalfile.txt user@hostname:remotefile.txt

  17. Full GUI controlof a remotecomputerwith VNC VNC – Virtual Network Computing Access to the complete graphicaluser interface (GUI) of a remotecomputer

  18. Full GUI controlof a remotecomputerwith VNC Client Server Screensharing OS X Go OS X RemoteManagement Connect to Server Windows RealVNC Linux Available in the OS vnc://serveraddress

  19. Troubleshootingremoteconnections Getting local with a Virtual PrivateNetwork (VPN) Elsewhere InstituteorUniversity Campus VPN (encrypted) Credentialverification

  20. Troubleshootingremoteconnections Mapping network connections “traceroute” command Trace the network steps betweenyoursystemand na address tracerouteremoteaddress

  21. Troubleshootingremoteconnections Configuringthebackspacekey Sometimesthebackspacekey can behavedifferenlybetweenmachines (^H) “stty” command sttyerase ‘^H’

  22. Controlinghowprogramsrun On regular computers “sleep” command Does nothing for a specifiednumberofseconds, andthen stops host:~lucy$ sleep 15 ls • Anycommandtypedwhilesleepisrunningwillberunafteritquits

  23. Controlinghowprogramsrun Terminating a process “^C” (ctrl + C)command Tries to terminate a programthatis active in thecommandline host:~lucy$ sleep 1000 Typing^Cwillendthesleepprogramandyouwillgetyourshellback

  24. Controlinghowprogramsrun Starting jobs in the background “&” command Runs theprogram in thebackgroud, enablingthe use oftheshell host:~lucy$ sleep 15 & [1] 4990 host:~lucy$ sleepisrunning in the background as job number [1] andprocess ID 4990

  25. Controlinghowprogramsrun Checking job status “ps” command Gives a snapshotofcurrent processes host:~lucy$ sleep 15 & [2] 4992 host:~lucy$ ps 4800 ttys001 0:00.02 –bash 4992 ttys001 0:00:00 sleep 15 Processidentifier (PID) ps -A Fulllistofeverythingyourcomputerisdoing

  26. Controlinghowprogramsrun Checking job status “top” command Real-time viewofthesamelist as ps top –o command The–o modifierspecifiesbywhatparameteryouwant to sort

  27. Controlinghowprogramsrun Suspending jobs andsendingthem to the background “^Z” (ctrl + Z)command Suspends na operationalreadyrunning 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

  28. Controlinghowprogramsrun Suspending jobs andsendingthem to the background “jobs”command Listsallthe background processes host:~lucy$ sleep 20 & [2] 5989 host:~lucy$ jobs [1]+ Stoppedsleep 15 [2]- Runningsleep20 & “bg”command Resumes a frozen job host:~lucy$ bg 1 [1]+ sleep 15 & [2] Donesleep20

  29. Controlinghowprogramsrun Stopping processes When a processisrunning in the background, itwillbeimpervious to interruptionsbythe^Ccommand “kill”command Terminatesanyprocess (evenrunning in the background) host:~lucy$ sleep 60 & [1] 5563 host:~lucy$ ps PID TTY TIME CMD 5089 ttys000 0:00.06 –bash 5563 ttys000 0:00:00 sleep60 host:~lucy$ kill 5063 host:~lucy$ ps PID TTY TIME CMD 5089 ttys000 0:00.06 –bash [1]+ Terminatedsleep 60

  30. Controlinghowprogramsrun Stopping processes Whenkilldoesn’twork… sudokill -9 5563 The-9parameterwill force theprogram to quit Thecombinedeffectwithsudoislethal

  31. Controlinghowprogramsrun Keeping jobs alive Whenyouleavetheshell, all processes are terminatedwithit (eventheones in the background) “nohup” (nohang-up)command Indicatesthattheprogramshouldkeeprunningevenwhentheshellisterminated nohupphrapinfile.sff –new_ace > log.txt 2> /dev/null < /dev/null & Redirectsthe output file to log.txt Sendsany error messagens to animaginaryplacecalled/dev/nulll

  32. Controlinghowprogramsrun Keeping jobs alive Thereisalso a way to modify a processafterithasstartedsothatitdoesn’tterminatewhentheshellcloses… Suspendtheprocesswith^Zcommand Sendit to thebackgroungusingbg 1 (orwhatever job isreported) Use thedisowncommand to releaseitfromtheshell disown -h It can stillterminatedue to output errors!

  33. Controlinghowprogramsrun Changingprogrampriority “renice” command Adjuststhepriorityofeachprocess for processorpower host:~lucy$ ps PID TTY TIME CMD 29932 ttys000 0:00.01 –bash 29938 ttys000 0:00:06 traxm1HPC –b 13 -#100 ... host:~lucy$ renice 19 29938 Priorityrangingfrom -20 (highest) to 19 (lowest)

  34. High-performanncecomputing Job management toolson clusters • It takes careofissueslikepriority management andshelltermination • Processes willbeterminatedifthey take too long • A configuration file withtheanalysisneeds to besent to the job manager

  35. Settingup a server • Installand configure server software for thedeviceyouwant to provide (ssh, web server…) • Configure the firewall onthe server to allowaccess to theserviceyouwillprovide • Makesureyour local network allowsconnections to computersfromtheoutsideworld • Get na IP addressorhostnameofyour server sothatothercomputers can findit

  36. Settingup a server Configuringthessh server Systempreferences Sharing pane Remole login (check)

  37. Settingup a server Findingyouraddress echo $HOSTNAME host:~lucy$ host $HOSTNAME Mostlikellyyour IP addresswillchange (hours/days) Use thesystemnamereturnedby$HOSTNAME Request a fixed IP to your network administrator

More Related