Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Timesaving Techniques For Dummies.pdf
Скачиваний:
59
Добавлен:
15.03.2015
Размер:
15.98 Mб
Скачать

Logging In with SSH and Key Authentication

221

To eliminate the need to enter your passphrase every time you log in to a remote system, you have to talk KDE (or GNOME) into asking you for the passphrase when you first log in to your local desktop. After the key is unlocked, it’s ready for use (and reuse) until you log out of your local desktop.

If you use KDE, the easiest way to set this up is with Konqueror. Here’s how:

1. Open your Konqueror browser and surf to the following directory:

~/.kde/Autostart

2. Right-click on the browser and choose Create New Link to Application from the pop-up menu.

3. Name your link (Passphrase) and click the

Execute tab.

4. In the Command field, enter the following command:

/usr/bin/ssh-add

5. Click OK.

A new Autostart icon appears in the Konqueror window. The next time you log in to KDE, you’ll be prompted for your passphrase.

If you’re a fan of GNOME, follow along to edit your Autostart folder:

1. Open the Main Menu and choose Preferences More Preferences Sessions.

2. Click the Sessions icon to open the Sessions dialog.

3. Click the Startup Programs tab and then click Add.

The Add Startup Program dialog appears.

4. Type /usr/bin/ssh-add in the Startup

Command field and click OK.

Logging In with SSH and Key Authentication

When you log in to an SSH server using public-key authentication, you’re greeted with a remote command line. The commands that you enter are executed by the SSH server until you log out. If you want to use graphical environments, you can access those, too. We give you the details in the following sections.

Starting from the command line

To use your key authentication to log in to a machine with SSH, follow these steps:

1. At the command line, type ssh bastille and press Enter.

You’re prompted for your passphrase (the one you entered when you generated your key set).

2. Enter the passphrase.

You’re logged in!

A few quick words about fingerprints

The first time you log in with SSH, your local system adds the server’s public key to its list of known computers and issues a warning similar to the following:

The authenticity of host `192.168.0.135’ can’t be established.

RSA key fingerprint is b4:2y:88:23:98:33:g1:03:ec:7b:d8:2b:b8:83:

y3:f8.

Are you sure you want to continue connecting (yes/no)?

Type yes and press Enter to continue.

In the future, if the server’s public key changes, SSH will warn you.

Some nasty people intercept transmissions and redirect logins to steal password information that will enable them to get into places

Соседние файлы в предмете Операционные системы