SSH how to in portguese

SSH How To

When the world was young, people used the telnet protocol to get connected to remote servers to do some shell work. Now it's old and rotten you have to use SSH (Secure Shell) to do that. From a user perspective, it's the same, you replace "telnet" by "ssh" in your command lines.

Now we're using something more secure to connect remote computers, it's time to get rid of passwords. Passwords suck, keys don't suck. You'd better use keys.


See the refs for more information about public keys crypto. If you know PGP, then it's the same. You have your private key and people have your public key. When they put your public key in the appropriate place in their computer, you can connect to said computer by SSH without password.

Unix + Linux

Generating and using keys

This works on Unix-like operating systems:

  • Generate a key: at the command prompt run:
    ssh-keygen -t dsa
    and give it a password when asked and type enter when asked something like "Enter file in which to save the key (/home/jibe/.ssh/id_dsa):".

You now have two files in your $HOME/.ssh/ directory: one is your public key, the other is the private key. The public key is, you can hand it to other people.

Next time you'll use ssh, it will ask you to give it the password for the key, NOT the password for your account on the remote computer. This means no password travel, you have improved our internet security, thank you.

Optional cool configurations

You can put something like:
eval "$(ssh-agent)"
trap 'eval $(ssh-agent -k)' EXIT
in your .profile file (for sh). That way you can give your password to ssh-add so that it reminds it. Run ssh-add -d when you want the agent to forget your password.


Using keys

There's a great how-to for using Putty (a SSH client implementation) on Windows:

Now with free color images!

If you want to run the OpenSSH server on Windows, use Cygwin or CoLinux.

More information

-- JiBe - 15 Apr 2004

This topic: Sysadmin > WebHome > SshHowTo
Topic revision: 27 Sep 2007, ToyaMileno
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback