12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

358CHAPTER 17Securing Remote Logins with OpenSSHConnecting from the ClientThis section discusses how to connect to an SSH server from a <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>system. The SSH server can be any server running an SSH daemon, including a <strong>Red</strong> <strong>Hat</strong><strong>Enterprise</strong> <strong>Linux</strong> system running OpenSSH.To connect to an SSH server, the openssh-clients RPM package must be installed. Installit via <strong>Red</strong> <strong>Hat</strong> Network if it is not already installed. This package provides the SSH utilitiesdiscussed in this section and summarized in Table 17.1.TABLE 17.1 OpenSSH Client UtilitiesOpenSSH Utility DescriptionsshSecurely log in to a remote system or execute a command on a remotesystemsloginAlias to the ssh commandscpCopy files from one computer to another while encrypting the datasftpSecurely transfer files from one system to anotherssh-addAdd RSA or DSA identities to the authentication agentssh-agent Remember private keys for public key authenticationssh-keyscan Gather public SSH keysLogging In to a Remote SystemThe most common OpenSSH utility is ssh, a secure replacement for rlogin, rsh, andtelnet. The ssh command allows users to remotely log in to a system from anothersystem using an encrypted transfer protocol. Every transfer starting with the usernameand password sent for authentication is encrypted so it can’t be easily read if intercepted.The system being connected to is considered the server. The system being connected fromis called the client.To log in to a system with ssh, use the following command, where is thehostname, fully qualified domain name, or IP address of the remote system:ssh If the hostname or fully qualified domain name is used, the client must be able to resolveit to a valid IP address. The first time a user tries to connect via ssh to another system, themessage in Listing 17.2 is displayed.LISTING 17.2Connecting to an SSH Server for the First TimeThe authenticity of host ‘172.31.0.1 (172.31.0.1)’ can’t be established.RSA key fingerprint is 66:50:c5:dc:ba:36:d4:3f:ea:93:1d:d8:56:e3:38:56.Are you sure you want to continue connecting (yes/no)?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!