The Secure Shell Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Slides:



Advertisements
Similar presentations
Sonny J Zambrana University of Pennsylvania ISC-SEO November 2008.
Advertisements

Linux commands exercise 1. What do you need, if you try to these at home? You need to download and install Ubuntu Linux from the Internet – DVD is need.
1 Automated SFTP Windows and SUN Linux and SUN. 2 Vocabulary  Client = local=the machine generating the SFTP request  Server = remote = the machine.
PlanetLab What is PlanetLab? A group of computers available as a testbed for computer networking and distributed systems research.
Computer Organization Tools Computer Organization 1 © WD McQuain Programming Tools Most of the programming assignments will require using.
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
NSRC Workshop Some fundamental security concerns... Confidentiality - could someone else read my data? Integrity - has my data been changed? Authentication.
1 © 2001 John Urrutia. All rights reserved. Chapter 5 The Shell Overview.
NETW-240 Shells Last Update Copyright Kenneth M. Chipps Ph.D. 1.
It's a binary file kept under specific directory.
Secure Shell – SSH Tam Ngo Steve Licking cs265. Overview Introduction Brief History and Background of SSH Differences between SSH-1 and SSH- 2 Brief Overview.
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.
Shell Basics CS465 - Unix. Shell Basics Shells provide: –Command interpretation –Multiple commands on a single line –Expansion of wildcard filenames –Redirection.
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
PlanetLab What is PlanetLab? A group of computers available as a testbed for computer networking and distributed systems research.
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.
Ssh: secure shell. overview Purpose Protocol specifics Configuration Security considerations Other uses.
A crash course in njit’s Afs
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Secure Connections to NERSC Systems Using the Secure Shell (SSH) Jed Donnelley 6/21/1999.
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.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
SSH. Review 1-minute exercise: Find the open ports on you own VM [Good] nmap [Better] netstat -lpunt.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 10 Manage Remote Access.
Lesson 11-Locating, Printing, and Archiving User Files.
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.
Secure Shell for Computer Science Nick Czebiniak Sung-Ho Maeung.
Andreas Steffen, , 11-SSH.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen M. Liebi Institute for Internet Technologies and Applications.
HP World 2005 Securing your Unix environment with HP Secure Shell Steven E Protter Senior Systems Administrator I.S.N. Corporation.
We will now practice the following concepts: - The use of known_hosts files - SSH connection with password authentication - RSA version 2 protocol key.
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
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.
NETWORKING IN LINUX. WHAT IS LINUX..? Freely implemention of UNIX-like Kernel. Free & Open source Software. Developed by Linus Torvalds in 1991.
LINUX programming 1. INDEX UNIT-III PPT SLIDES Srl. No. Module as per Session planner Lecture No. PPT Slide No. 1.Problem solving approaches in Unix,Using.
Workbook 10 Chapter 8. Remote Shell Commands Pace Center for Business and Technology 1.
Browsing Directories Copyright © Software Carpentry and The University of Edinburgh This work is licensed under the Creative Commons Attribution.
Application Services COM211 Communications and Networks CDA College Theodoros Christophides
Pipes and Filters Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
I/O and Redirection. Standard I/O u Standard Output (stdout) –default place to which programs write u Standard Input (stdin) –default place from which.
Berkeley R Utilities & the new S Utilities The Unix (or Berkeley) r utilities provide an alternative to IP facilities telnet and ftp. Three programs: rlogin.
Next Unix Topics Tuesday, 2/11 & 18/2014. Change Password (by 2/14/14) ssh to account on – faclinux.cse.ohio-state.edu – stdlinux.cse.ohio-state.edu passwd.
Secure Shell (SSH) Presented By Scott Duckworth April 19, 2007.
Files and Directories Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
SSH Tricks Slide 1 SSH Tricks Matthew G. Marsh. SSH Tricks Slide 2 Overview  SSH –What is it –How does it work  Discussion of Network Topology –Tricks.
Phil Hurvitz Securing UNIX Servers with the Secure.
SSH Tricks for CSF Slide 1 NEbraskaCERT SSH Tricks Matthew G. Marsh 05/21/03.
Introduction to Programming Using C An Introduction to Operating Systems.
Advanced Programming in the UNIX Environment Hop Lee.
Team 6 Decrypting Encryption Jeffrey Vordick, Charles Sheefel, and Shyam Rasaily.
1 Running MPI on “Gridfarm” Bryan Carpenter February, 2005.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Security with SSH Unix System Administration Workshop AfNOG 2007 Hervey Allen.
SSH - Lab We will now practice the following concepts: - The use of known_hosts files - SSH connection with password authentication - RSA version 2.
Secure services Unit-IV CHAP-1
GRID COMPUTING.
Andy Wang Object Oriented Programming in C++ COP 3330
Some Linux Commands.
Getting SSH to Work Between Computers
Introduction to UNIX.
CSCI The UNIX System Shell Startup and Variables
Introduction Paul Flynn
Andy Wang Object Oriented Programming in C++ COP 3330
CIS 155 Lecture 10, Farewell to UNIX
Be comfortable with Linux
Presentation transcript:

The Secure Shell Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See for more information. The Unix Shell

Unix ShellSecure Shell $ pwd shell

Unix ShellSecure Shell $ pwd /users/vlad $ shell

Unix ShellSecure Shell login as: vlad Password: ******** shell

Unix ShellSecure Shell login as: vlad Password: ******** $ shell

Unix ShellSecure Shell login as: vlad Password: ******** moon> shell remote shell

Unix ShellSecure Shell login as: vlad Password: ******** moon> shell remote shell

Unix ShellSecure Shell $ pwd /users/vlad $ ssh Password:

Unix ShellSecure Shell $ pwd /users/vlad $ ssh Password: *** Access denied Password:

Unix ShellSecure Shell $ pwd /users/vlad $ ssh Password: *** Access denied Password: ******** moon> pwd /home/vlad moon> ls -F bin/ cheese.txt dark_side/ rocks.cfg

Unix ShellSecure Shell $ pwd /users/vlad $ ssh Password: *** Access denied Password: ******** moon> pwd /home/vlad moon> ls -F bin/ cheese.txt dark_side/ rocks.cfg moon> exit $ pwd /users/vlad

Unix ShellSecure Shell $ ssh Password: ******** moon> pwd /home/vlad moon> ls -F bin/ cheese.txt dark_side/ rocks.cfg moon> exit $ pwd /users/vlad $ ls -F bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/

Unix ShellSecure Shell $ scp source file...

Unix ShellSecure Shell $ scp source file... …to destination directory

Unix ShellSecure Shell $ scp source file... …to destination directory source and destination are written as

Unix ShellSecure Shell $ scp Password: ******** cheese.txt 100% KB/s 00:00

Unix ShellSecure Shell $ scp $ scp -r -r indicates a directory and its contents

Unix ShellSecure Shell $ scp -r $ scp -r /users/vlad $ pwd /users/vlad $ scp -r same destination path

Unix ShellSecure Shell $ ssh Password: ******** moon> df –h Filesystem Size Used Avail Use% Mounted On /dev/sda1 7.9G 2.1G 5.5G 28% / /dev/sda2 791G 150G 642G 19% /home moon> df –h > usage.txt moon> exit $ scp Password: ******** usage.txt 100% KB/s 00:00

Unix ShellSecure Shell $ ssh 'df –h' Password: ******** Filesystem Size Used Avail Use% Mounted On /dev/sda1 7.9G 2.1G 5.5G 28% / /dev/sda2 791G 150G 642G 19% /home

Unix ShellSecure Shell $ ssh 'df –h' Password: ******** Filesystem Size Used Avail Use% Mounted On /dev/sda1 7.9G 2.1G 5.5G 28% / /dev/sda2 791G 150G 642G 19% /home $ ssh 'df –h' >> usage.log Password: ******** $ ls -F bin/ data/ mail/ music/ notes.txt papers/ pizza.cfg solar/ solar.pdf swc/ usage.log usage.txt same result

Unix ShellSecure Shell $ echo "open sesame, please" | ssh 'cat > magic.txt' Password: ******** character stream

Unix ShellSecure Shell $ echo "open sesame, please" | ssh 'cat > magic.txt' Password: ******** character stream remote shell receives stream from pipe remote command receives input piped to ssh cat repeats input stream as output redirection within remote shell

Unix ShellSecure Shell $ ssh 'ls –F /home/vlad' Password: ******** bin/ cheese.txt dark_side/ rocks.cfg $ echo "open sesame, please" | ssh 'cat > magic.txt' Password: ******** $ ssh 'ls –F /home/vlad' Password: ******** bin/ cheese.txt dark_side/ magic.txt rocks.cfg before after

Unix ShellSecure Shell $ ssh 'ls –F /home/vlad' Password: ******** bin/ cheese.txt dark_side/ rocks.cfg $ echo "open sesame, please" | ssh 'cat > magic.txt' Password: ******** $ ssh 'ls –F /home/vlad' Password: ******** bin/ cheese.txt dark_side/ magic.txt rocks.cfg $ scp Password: ******** before after

Unix ShellSecure Shell login as: vlad Password: ******** shell remote shell

Unix ShellSecure Shell shell remote shell login as: vlad Password: thriller

Unix ShellSecure Shell shell remote shell login as: vlad Password: thriller

Unix ShellSecure Shell shell remote shell

Unix ShellSecure Shell shell remote shell

Unix ShellSecure Shell shell remote shell

Unix ShellSecure Shell shell remote shell

Unix ShellSecure Shell shell remote shell

Unix ShellSecure Shell shell remote shell public key private key (only 1 copy) encryption using public key cannot decrypt using public key

Unix ShellSecure Shell shell remote shell login as: vlad Password: ********* huxyo ew: xdvw uqfcmjbn: lhiujdbj

Unix ShellSecure Shell $ ssh The authenticity of host ‘moon ( )‘ can't be established. RSA key fingerprint is f1:68:f5:90:47:dc:a8:e9:62:df:c9:21:f0:8b:c5:39. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘moon, ' (RSA) to the list of known hosts. Password: ******** moon>

Unix ShellSecure Shell while true:... if time.mins == 30: ssh 'df –h' >> usage.log...

Unix ShellSecure Shell $ ssh 'df –h' >> usage.log Password: Connection closed by $ waited too long while true:... if time.mins == 30: ssh 'df –h' >> usage.log...

Unix ShellSecure Shell host key pair only 1 copy default if user has no user key pair user key pair 1 user key pair 2

Unix ShellSecure Shell $ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/users/vlad/.ssh/id_rsa): Enter passphrase (empty for no passphrase): ******** Enter same passphrase again: ******** Your identification has been saved in /users/vlad/.ssh/id_rsa. Your public key has been saved in /users/vlad/.ssh/id_rsa.pub. The key fingerprint is: d3:1a:27:38:aa:54:e8:a5:03:db:79:2f:b2:c3:c9:3d press enter

Unix ShellSecure Shell $ ssh Enter passphrase for key '/users/vlad/.ssh/id_rsa': ******** moon>

Unix ShellSecure Shell $ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/users/vlad/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /users/vlad/.ssh/id_rsa. Your public key has been saved in /users/vlad/.ssh/id_rsa.pub. The key fingerprint is: d3:1a:27:38:aa:54:e8:a5:03:db:79:2f:b2:c3:c9:3d press enter

Unix ShellSecure Shell $ scp ~/.ssh/id_rsa.pub Password: ******** $ ssh Password: ******** moon> cat id_rsa.pub >> ~/.ssh/authorized_keys moon> exit $ cat ~/.ssh/id_rsa.pub | ssh 'cat >> ~/.ssh/authorized_keys' Password: ******** $ ssh-copy-id Password: ********

Unix ShellSecure Shell $ ssh moon> while true:... if time.mins == 30: ssh 'df –h' >> usage.log...

February 2011 created by Elango Cheran Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See for more information.