-c cipher 暗号化アルゴリズムを選択する。
cipher には idea,3des,blowfishが指定できる。-C データを圧縮して送信する。
圧縮レベルの指定は ~/.ssh/config で指定する。-f バックグラウンドプロセスとして起動する。
ssh -f muse01 kterm のように使う。-i file ユーザー秘密鍵ファイルを指定する。
defaultでは ~/.ssh/identity-l user ログインする時のユーザー名 -o 'option' ~/.ssh/config で定義できる命令を指定することができる。 -q warnningメッセージの表示を抑止する。 -v デバッグメッセージを表示する。
ssh-keygen ユーザーRSA鍵(秘密鍵と公開鍵)の生成 ssh-keygen -c ユーザーRSA鍵のコメントを変更する ssh-keygen -p ユーザーRSA鍵のパスフレーズを変更する
ユーザー名@ホスト名コメントをメイルアドレスにしてRSA公開鍵を生成したい場合は -C オプションをつけて、実行します。
Initializing random number generator... Generating p: ...............++ (distance 300) Generating q: ......++ (distance 34) Computing the keys... Testing the keys... Key generation complete. Enter file in which to save the key (/homea/welcom19/.ssh/identity): ユーザーRSA鍵の秘密鍵を保存する場所、ファイル名を指定する。 Enter passphrase: ユーザーRSA鍵の秘密鍵を利用するためのパスフレーズを入力する。 Enter the same passphrase again: Your identification has been saved in /homea/welcom19/.ssh/identity. Your public key is: 1024 37 110525....0539735558527266977069 welcom19@mse.waseda.ac.jp Your public key has been saved in /homea/welcom19/.ssh/identity.pubこれにより、~welcom19/.sshの下に以下のファイルが生成されます。
これらファイルのアクセス権は
identity ユーザーRSA鍵の秘密鍵 identity.pub ユーザーRSA鍵の公開鍵
となっています。
-rw------- identity -rw-r--r-- identity.pub
Enter passphrase for RSA key 'welcom19@mse.waseda.ac.jp': ssh-keygenで設定したパスフレーズを入力する。 Last login: Wed May 5 13:20:34 1999 from 133.9.7.96 Sun Microsystems Inc. SunOS 5.7 Generic October 1998 ############################################################## Your E-mail address is welcom19@mse.waseda.ac.jp ############################################################## You don't have any mail waiting on mse-popd mse-mail >パスフレーズを間違えて入力した場合
Enter passphrase for RSA key 'welcom19@mse.waseda.ac.jp': Bad passphrase. パスフレーズが違う。 welcom19@muse01's password: パスワード認証を行なう。 Last login: Thu May 6 16:21:21 1999 from muse01 Sun Microsystems Inc. SunOS 5.7 Generic October 1998 ############################################################## Your E-mail address is welcom19@mse.waseda.ac.jp ############################################################## You don't have any mail waiting on mse-popd mse-mail >
~/.ssh/config の内容
------------------------------
Host *
PasswordAuthentication no
------------------------------
Enter passphrase for RSA key 'welcom19@mse.waseda.ac.jp': Bad passphrase. Permission denied. パスフレーズを間違えると、接続できません。
Enter passphrase for RSA key 'welcom19@mse.waseda.ac.jp': Bad passphrase. welcom19@muse01's password: パスワード入力が促されます。(注)
Host key not found from the list of known hosts. Are you sure you want to continue connecting (yes/no)? yesyesにすると ~/.ssh/known_hostsファイルにmuse01のホスト公開鍵が登録されます。