In this lab, you’ll establish a secure shell connection between two remote systems: the main lab system and a second server. You’ll learn how to run commands on those remote systems, how to “drop ship” a command from one system to another and harvest the output locally, and how to copy via the `scp` and `sftp` commands.
Additionally, we’ll show how to ensure you can send and receive files and directories into the proper locations, either putting files from system1 to system2 or pulling files from system1 from system2.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Establish a Secure Shell Connection Between Two SUSE Linux Enterprise Servers
- Use the
ssh
command and lab-specific system information to establish an SSH client session between your main lab system and a second lab system. - Run commands on the remote system just as if you were on the console.
- Disconnect and run
ssh
commands in "hands-off" mode on the second system without actually creating a shell session, just dropping the command off and getting output on your first system.
SSH from Server1 to Server2
ssh cloud_user@10.0.1.20
- Use the
- Send and Receive Files and Directories Between Two SUSE Linux Enterprise Servers via `scp` and `sftp`
- Use the
scp
command to send and receive files between two servers, either pushing from the main system to the secondary, or being signed on the secondary and pulling the files to that system. - Use the
sftp
command to establish a secure FTP session between the two systems and both send and receive files and directories between the systems, along with some interesting options.
- Use the
- Automate the Keyscanning of Other Hosts, Reporting Any Mismatches
- View your system’s
known_hosts
initial state, then keyscan another system, and redirect that information to a master file for future reference. - Connect to the remote system via SSH and view the changes that occur in your
known_hosts
file locally. - Build an automated keyscanning setup that will scan a list of hosts for the proper key information, sort and make unique that info, and compare it against the known good master list, reporting any mismatches.
- View your system’s