[root@sunny♥泰用哲學♥/temp]# tar xvfjp openssh-4.3p2-noacss.tar.bz2
[root@sunny♥泰用哲學♥/temp]# cd openssh-4.3p2
[root@sunny♥泰用哲學♥/temp/openssh-4.3p2]# ./configure --prefix=/usr/local/openssh --sysconfdir=/usr/local/etc --with-tcp-wrappers \
--with-ipv4-default --with-ssl-dir=/usr/
[root@sunny♥泰用哲學♥/temp/openssh-4.3p2]# make ; make install ; make host-key
[root@sunny♥泰用哲學♥/temp/openssh-4.3p2]# install -m644 contrib/redhat/sshd.pam /etc/pam.d/sshd
[root@sunny♥泰用哲學♥/temp/openssh-4.3p2]# cp opensshd.init /etc/init.d/sshd2
[root@sunny♥泰用哲學♥/temp/openssh-4.3p2]# cd /usr/local/etc/
[root@sunny♥泰用哲學♥/usr/local/etc]# vi sshd_config
===============================================================
Port 22
Protocol 2,1
# HostKey for protocol version 1
HostKey /usr/local/etc/ssh_host_key
# HostKeys for protocol version 2
HostKey /usr/local/etc/ssh_host_rsa_key
HostKey /usr/local/etc/ssh_host_dsa_key
PermitRootLogin no
UseDNS yes
PidFile /var/run/sshd.pid
# override default of no subsystems
Subsystem       sftp    /usr/local/openssh/libexec/sftp-server
=====================================================================
[root@sunny♥泰用哲學♥/usr/local/etc]# ln -s /usr/local/openssh/bin/ssh /usr/local/sbin/
[root@sunny♥泰用哲學♥/usr/local/etc]# ln -s /usr/local/openssh/bin/sftp /usr/local/sbin/
[root@sunny♥泰用哲學♥/usr/local/etc]# ln -s /usr/local/openssh/bin/scp /usr/local/sbin/
[root@sunny♥泰用哲學♥/usr/local/etc]# ln -s /usr/local/openssh/bin/ssh-keygen /usr/local/sbin/
[root@sunny♥泰用哲學♥/usr/local/etc]# chmod 700 /etc/init.d/sshd2 ; chown root:root /etc/init.d/sshd2
[root@sunny♥泰用哲學♥/usr/local/etc]# chkconfig --add sshd2 ; chkconfig --add sshd2
[root@sunny♥泰用哲學♥/usr/local/etc]# service sshd2 start
[root@sunny♥泰用哲學♥/usr/local/etc]# ps aux | grep ssh
root     25719  0.0  0.0   3776   956 ?        Ss   22:27   0:00 /usr/local/openssh/sbin/sshd ==> 성공

 

+ Recent posts