
openssh-2.9p2.tar.gzを
ftp://ftp.jp.openbsd.org/pub/OpenBSD/OpenSSH/portableなどから入手する.
% gunzip openssh-2.9p2.tar.gz
% tar xvf openssh-2.9p2.tar
% cd ./openssl-2.9p2
% ./configure --with-ssl-dir=/usr/local/ssl/
% make
% su - root
Password: xxxxxxxxxx
# make install
# cd /etc
# mkdir sshd
# cd sshd
# ssh-keygen -t rsa1 -f ssh_host_key -N ""
# ssh-keygen -t rsa -f ssh_host_rsa_key -N ""
# ssh-keygen -t dsa -f ssh_host_dsa_key -N ""
# cd /usr/local/etc
# vi sshd_config
Protocol 1,2
HostKey /etc/sshd/ssh_host_key
HostKey /etc/sshd/ssh_host_rsa_key
HostKey /etc/sshd/ssh_host_dsa_key
:wq!
# /usr/local/sbin/sshd -d
debug1: Seeded RNG with 38 bytes from programs
debug1: Seeded RNG with 3 bytes from system calls
debug1: sshd version OpenSSH_2.9p2
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
Generating 768 bit RSA key.
RSA key generation complete.
^C
# cd /etc/init.d
# vi localdaemons
#!/sbin/sh
PATH=/usr/bin:/bin
case $1 in
'start')
# sshd
if [ -f /usr/local/sbin/sshd ]; then
echo "Starting sshd."
/usr/local/sbin/sshd;
fi
;;
'stop')
# sshd
pid=`/usr/bin/ps -e | /usr/bin/grep sshd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
if [ "${pid}" != "" ]; then
echo "Stopping sshd daemon "
/usr/bin/kill ${pid}
fi
;;
*)
echo "usage: sh /etc/init.d/localdaemons {start|stop}"
;;
esac
:wq!
# cd /etc/rc2.d
# ln -s /etc/init.d/localdaemons S99localdaemons
# sh /etc/init.d/localdaemons start
# exit
% slogin host-name
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'host-name,IP address' (RSA) to the list of known hosts.
username@host-name's password: xxxxxxxxxx
%
PC上で TeraTerm を用いて OpenSSH の機能を利用するにはTTSSHのインストール(キャンパス内参照可)を参照.
インストールの方法はOpen SSH Ver.2.9p2と同じ.ただし,Solarisでは,/dev/randomがサポートされていないため,次のいずれかの方法を採用する必要がある.
インストール後に
# mkdir /var/empty
# vi /etc/passwd
sshd:x:27:27:sshd privsep:/var/empty:/sbin/nologin
:wq!
# vi /etc/group
sshd::27:
:wq
# /usr/local/sbin/sshd
- 2002-06-26付のCERT Advisory CA-2002-18にて Open SSH のセキュリティ・ホールが報告されました.Ver.3.4以上にバージョン・アップする必要があります.2003-05-21付のJPCERT/CCで,バージョン3.6.1p1以前のportable
version にセキュリティ・ホールがあることが報告されました.バージョン3.6.1.p2にバージョン・アップを行う必要があります.
- CERT/CC Vulnerability Note VU#602204 VU#209807において,Ver.3.7p1および3.7.1.p1に脆弱性が指摘されました.Ver.3.7.1.p2以降にバージョンアップを行う必要があります.(2003/10/01)