ssh をインストールしたときのメモ。 ↓ここから get。 http://www.openssh.com/ rin@maaya# tar xzf ssh-2.3.0.tar.gz rin@maaya# cd ssh-2.3.0 README にしたがって作業する。 これで良いのかは、よく分からん。(ぉぃ rin@maaya# ./configure && make rin@maaya# su bash# make install rin@maaya# rehash rin@maaya# which ssh /usr/local/bin/ssh rin@maaya# su bash# rm /etc/ssh2/hostkey* bash# ssh-keygen2 -P /etc/ssh2/hostkey Generating 1024-bit dsa key pair 1 oOo.oO Key generated. 1024-bit dsa, rin@maaya, Fri Nov 24 2000 23:03:10 +0900 Key is stored with NULL passphrase. (This is not recommended. Don't do this unless you know what you're doing. If file system protections fail (someone can access the keyfile), or if the super-user is malicious, your key can be used without the deciphering effort.) Private key saved to /home/rin/.ssh2/hostkey Public key saved to /home/rin/.ssh2/hostkey.pub bash# exit rin@mariko# ssh-keygen Generating 1024-bit dsa key pair 1 oOo.oOo.oOo. 2 Oo.oOo.oOo.o 3 o.oOo.oOo.oO 4 .oOo.oOo.oOo 5 oOo.oOo.oOo. 6 Oo.oOo.oOo.o 7 o.oOo.oOo.oO 8 .oOo.oOo.oOo Key generated. 1024-bit dsa, rin@mariko, Thu Jan 04 2001 08:50:31 Passphrase : Again : Private key saved to /home/rin/.ssh2/id_dsa_1024_a Public key saved to /home/rin/.ssh2/id_dsa_1024_a.pub rin@mariko# su bash# /usr/local/sbin/sshd /usr/local/sbin/sshd sshd: SSH Secure Shell 2.3.0 (non-commercial version) on i586-pc-linux-gnu bash# exit rin@mariko# ssh -l rin maaya warning: Warning: Need basic cursor movement capablity, using vt100 Host key not found from database. Key fingerprint: xorih-bugin-ryveg-ricyl-syhup-kasar-sirag-gorar-belun-hysyp-gyxax You can get a public key's fingerprint by running % ssh-keygen -F publickey.pub on the keyfile. Are you sure you want to continue connecting (yes/no)? yes Host key saved to /home/rin/.ssh2/hostkeys/key_22_maaya.pub host key for maaya, accepted by rin Thu Jan 04 2001 08:53:58 rin's password: yesAuthentication successful. /usr/X11R6/bin/xauth: creating new authority file /home/rin/.Xauthority Last login: Thu Jan 01 1970 09:00:00 +0900 from Linux 2.2.16. You have new mail. The idea is to die young as late as possible. -- Ashley Montague rin@maaya# exit 次に、ftp してみる。 rin@maaya# sftp mariko Warning: Warning: Need basic cursor movement capablity, using vt100 warning: Warning: Need basic cursor movement capablity, using vt100 rin@mariko's password: sftp> あれ? 違うユーザでログインできないや。 これじゃ使えん。 今度やり直そう。 以下、server の設定。 /etc/rc.d/rc.inet2 に下記を書く。 if [ -x /usr/local/sbin/sshd ]; then echo -n " sshd" /usr/local/sbin/sshd fi で、 bash# /usr/local/sbin/sshd 実行は、root でなくても良いらしいが。 参考 URL: http://www.vacia.is.tohoku.ac.jp/~s-yamane/FAQ/ssh/