Hack 16. SSH のエスケープ文字を使用して SSH セッションのステータスを表示する
現在の ssh セッションについての有用な情報を取得するには、次のようにします。
これは SSH2 クライアントでのみ動作します。
1. ローカルホストからリモートホストにログインする
localhost$ ssh -l jsmith remotehost
2. リモートホスト上で、ssh のエスケープ文字 ~ と続けて s を入力します。
これで現在の SSH 接続に関する情報が表示されます。
remotehost$ [注意: ~s は入力時にコマンド上では見えません] remote host: remotehost local host: localhost remote version: SSH-1.99-OpenSSH_3.9p1 local version: SSH-2.0-3.2.9.1 SSH Secure Shell (non-commercial) compressed bytes in: 1506 uncompressed bytes in: 1622 compressed bytes out: 4997 uncompressed bytes out: 5118 packets in: 15 packets out: 24 rekeys: 0 Algorithms: Chosen key exchange algorithm: diffie-hellman-group1-sha1 Chosen host key algorithm: ssh-dss Common host key algorithms: ssh-dss,ssh-rsa Algorithms client to server: Cipher: aes128-cbc MAC: hmac-sha1 Compression: zlib Algorithms server to client: Cipher: aes128-cbc MAC: hmac-sha1 Compression: zlib localhost$
さらに SSH 情報について
認証に基づく SSH キーをセットアップするために、openSSH や SSH2 のチュートリアルを参照してください。