You are on page 1of 2

SUSE Linux Enterprise Server Advanced Administration

5- 1 Practice using OpenSSH Utilities

Description:
In this exercise, you practice using the SSH suite of utilities.

Task 1: Open a terminal session


1. On server2, as the tux user, open a terminal by clicking on the Activities menu and
type:
terminal
When the Terminal icon appears, click on it to start a terminal session

Task 2: Access a remote server using SSH


1. Enter the following command to connect to the server1 machine:
ssh tux@server1
If prompted accept server1's host key by entering:
yes
2. When prompted enter tux's password for server1 (linux)
You are now logged in to server1 as tux
3. Log out by entering:
exit
4. Enter the following on server1 to view the processes running on server2:
ssh tux@172.16.2.22 ps aux
If prompted accept host key by entering:
yes
5. When prompted enter tux's password for server2 (linux)
After entering tux's password, a list of all processes currently running on server2 should
be displayed

Task 3: Use scp to Copy Files to and from a Remote Server


Do the following on server1:
1. Enter the following command to copy the /etc/hosts file from server2 to the /tmp
directory on server1:
scp tux@172.16.2.22:/etc/hosts /tmp/

48
SUSE Linux Enterprise Server Advanced Administration
When prompted enter tux's password for server2
2. On server1, enter the following command to verify that the file was transferred:
ls /tmp/hosts
You should see the hosts file from the server2 server in your /tmp directory
3. Enter the following command on server1 to copy the /etc/hosts file from server1 to
tux’s home directory on server2:
scp /etc/hosts tux@172.16.2.22:~
When prompted enter tux's password for server2
4. On server2 browse to the tux user's home directory (/home/tux) to verify that the file
was copied
You should see the hosts file from the server1 in the tux user’s home directory on
server2

Task 4: Use sftp


Do the following on server1
1. Enter the following command to connect via sftp to server2:
sftp tux@172.16.2.22
When prompted enter tux's password for server2
2. You should be at an sftp> prompt on server2
3. Enter the following command to copy the /bin/date program from server2 to tux’s
home directory:
get /bin/date /home/tux/
4. Exit sftp by entering:
exit
5. Browse to the tux user's home directory to verify that the file was transferred

Summary:
In this exercise you practiced using the SSH suite of utilities.

(End of Exercise)

5- 2 Configure Key Based Authentication in OpenSSH

Description:

49

You might also like