12.07.2015 Views

download

download

download

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.

Network Services—Internet ServersOnce the server is started, you can remotely log into the server using thessh command:# ssh joe@192.168.0.5This will start a secure shell to host 192.168.0.5 using the username "joe".The ssh command will use your current system login name if theusername is not specified.Once you have authenticated with the destination host, basically using a password,you will get a shell prompt on an encrypted tunnel to the server.This is the very basic usage of the ssh command. However, SSH offers many morefeatures than just a simple shell connection.Running a Command RemotelyIf you want only to run a command on a remote host, and you do not need a fullyfunctional shell, you can run that command using a single the ssh command.# ssh 192.168.0.5 ps axThe above example establishes a secure shell connection to host 192.168.0.5 and runsthe command ps ax (that shows a list of currently running processes for all users)and then closes the secure shell connection to the server and returns to your localhost's prompt.There is no login information specified in the command prompt. In this case, SSHassumes that you want to use the username that you are currently logged on to yoursystem with it. It also asks for a password, once the connection is established.SSH KeysAsking for a password during login is the default behavior of SSH. However, thereare various authentication models than can be used in stead of passwords.A widely used method is using the SSH keys, instead of a password. Using keyshas some advantages over using password. Using keys is more secure as no one canlook over your shoulder to find out what you are typing as a password, or run abrute-force attack on the SSH server to find out your password (if your account is notconfigured to using a password for login).Another major advantage is that you do not have to enter your password every timeyou want to log into a remote server. So if you are using SSH frequently, you do nothave to enter the password every time you log into a host.[ 208 ]

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

Saved successfully!

Ooh no, something went wrong!