RSH, SSH, RCP TABLE OF CONTENTS --------------------------------------------------------------------- ## BACKGROUND H1. What is a shell? H2. rlogin (remote login) H3. SSH ## RSH RS1. Description RS2. Usage ## RCP RC1. Description RC2. Usage ## SSH SH1. Description SH2. Usage BACKGROUND --------------------------------------------------------------------- H1. What is a shell? * An interface for users to interact with the machine/kernel * Examples: MS-DOS, bash, csh, etc... H2. rlogin (remote login) * A utility released as part of the BSD Unix operating system 1983. * Allows users to log in to another host via a network * Features the two utilities rsh (remote shell) and rcp (remote copy) * Important security issues - sends all information, including passwords, unencrypted. Thus, it is very insecure and is extremely vulnerable to malicious attacks over a network * Typically configured to not ask for a password, due to an assumed trusted network * Uses TCP port 514 H3. SSH * Because rlogin is insecure over an untrusted network, SSH was created to replace it in 1995 * Uses a secure, encrypted channel for communication * Authentication is done using public-key cryptography * Typically uses TCP port 22 * Many implementations for Windows, Mac, and Unix RSH --------------------------------------------------------------------- RS1. Description * Remote SHell * Allows a user to execute shell commands as another user, and access another computer via a network (if an RSH server, rshd, is running). * As a security measure, most machines do not, and should not, allow rsh connections from an untrusted network such as the Internet RS2. Usage * Example: Login to 'host.example.com' as user 'bob' > rsh -l bob host.example.com * Example: Execute the 'date' command on 'host.example.com' as user 'bob' > rsh -l bob host.example.com date * Example: Append a remote file to the end of a local file > rsh host.example.com cat remotefile >> localfile * Example: Append a remote file to the end of a remote file > rsh host.example.com cat remotefile ">>" other_remotefile * (maybe show examples on Mimosa, logging into the compute nodes, etc) * man rsh RCP --------------------------------------------------------------------- RC1. Description * Remote CoPy * Allows a user to copy one or more files from one machine to another RC2. Usage * Example: Copy 'file1' from the current directory on the local host to the '/home/user' directory on 'host2' > rcp file1 host2:/home/user * Example: Copy 'file1' from the '/home/user' directory on 'host2' to the currect directory on the local host > rcp host2:/home/user file1 * Example: Working as different users 'bob' and 'jill' > rcp bob@host1:/home/bob/bobs_file jill@host2:/home/jill/bobs_file * (examples) * man rcp SSH --------------------------------------------------------------------- SH1. Description * Secure SHell * Allows data exchange over a secure, encrypted channel * As in rsh, allows commands to be executed remotely * Supports tunneling of TCP ports and X11 (GUI) connections * Can transfer files using 'scp' or interactively with 'sftp' SH2. Usage * Example: Login to 'host.example.com' as user 'bob' > ssh bob@host.example.com * Example: Run the 'date' command as user 'bob' on 'host.example.com' > ssh bob@host.example.com date * Example: Copy local file 'file1' to 'host.example.com' > scp file1 bob@host.example.com:/home/bob/file1 * (examples) * man ssh * man scp * man sftp