Logging in to Remote Systems with ssh


Logging in to Remote Systems with ssh

You might already be using ssh to connect to your Unix system. You can, though, use it to connect to and use practically any other computer system on the Internet (assuming you have rights to log in to it), as Code Listing 12.1 shows.

Code Listing 12.1. Use ssh to connect securely to other systems on the Net.

[jdoe@frazz jdoe]$ ssh server.example.com jdoe@server's password: jdoe /home/jdoe $ whoami jdoe jdoe /home/jdoe $ uname -a Linux server.example.com 2.4.19-ac4 #13 SMP  Sat Nov 16 05:30:56 MST 2002 i686  unknown unknown GNU/Linux jdoe /home/jdoe $ logout [jdoe@frazz jdoe]$ 

To Connect to Another Computer Using ssh:

1.

ssh server.example.com

At the shell prompt, type ssh followed by the name of the system to which you want to connect.

2.

Log in using the instructions you have for accessing the system.

Presumably, if you're accessing a system over the Internet, you have some reason to do so and permission to do so. In some cases, you'll type the name of the application, or you might be using the remote system just as you use the system from which you are connecting.

3.

After you've finished using the remote system, log out according to the instructions and policies of the remote system.

Tips

  • For help with ssh, type ssh at the shell prompt and look at the list of options, or do man ssh for more help. When you have an active session, use to get help with the current session.

  • If you have a different login name on the remote system, you can specify that to ssh with ssh server.example.com l otherusername to log in more easily. Or, if it's easier to remember, try ssh otherusername@server.example.com.





Unix(c) Visual Quickstart Guide
UNIX, Third Edition
ISBN: 0321442458
EAN: 2147483647
Year: 2006
Pages: 251

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net