1. Download openssl-0.9.8e.tar.gzand openssh-4.6p1.tar.gz. The former is the SSL protocol, and the latter is the shell.
Resend
========================================================== ======================================
2. Install OpenSSL 2.2
# Cd/usr/local/src
# Tar zxvf openssl-0.9.8e.tar.gz
# Cd openssl-0.9.8e
#./Config shared zlib
# Make
# Make Test
# Make install
MV/usr/bin/OpenSSL. Off
MV/usr/include/OpenSSL. Off
Ln-S/usr/local/SSL/bin/OpenSSL/usr/bin/OpenSSL
Ln-S/usr/local/SSL/include/OpenSSL/usr/include/OpenSSL
2.3 configure the library file search path
# Echo "/usr/local/SSL/lib">/etc/lD. So. conf
# Ldconfig-V
2.4 check the OpenSSL version to verify whether the installation is correct.
# OpenSSL version-
OpenSSL 0.9.8e 11 API 2007
Built on: Sat Mar 24 21:24:41 CST 2007
Platform: Linux-elf
Options: BN (64,32) md2 (INT) RC4 (idx, INT) des (PTR, risc1, 16, long) idea (INT) blowfish (idx)
Compiler: gcc-FPIC-dopenssl_pic-dzlib-embedded-d_reentrant-algorithm-dl_endian-dtermio-O3-fomit-frame-pointer-wall-firewall-algorithm-dsha1_asm-dmd5_asm-drmd160_asm- daes_asm
Openssldir: "/usr/local/SSL"
3. download and install the latest OpenSSH
3.1 download the software package to the/usr/local/src directory.
Ftp://openbsd.nsysu.edu.tw/BSD/OpenBSD/OpenSSH/portable/openssh-4.6p1.tar.gz
3.2 Installation
# Cd/usr/local/src
# Tar zxvf openssh-4.6p1.tar.gz
# Cd openssh-4.6p1
#. /Configure -- prefix =/usr -- sysconfdir =/etc/ssh -- With-pam -- With-zlib -- With-SSL-Dir =/usr/local/SSL -- with-md5-passwords -- Mandir = /usr/share/man
# Make
# Make install
3.3 check the OpenSSH version number and verify the installation result
# Ssh-V
Openssh_4.6p1, OpenSSL 0.9.8e 11 Apr 2007
Usage: SSH [-1246 aacfgkmnnqsttvvxxy] [-B bind_address] [-C cipher_spec]
[-D [bind_address:] Port] [-e escape_char] [-F configfile]
[-I identity_file] [-L [bind_address:] Port: Host: hostport]
[-L login_name] [-M mac_spec] [-O ctl_cmd] [-O option] [-P port]
[-R [bind_address:] Port: Host: hostport] [-s ctl_path]
[-W local_tun [: remote_tun] [user @] hostname [command]
4. Start and verify the Service Activation status
4.1 debug and start sshd properly.
#/Usr/sbin/sshd-d
Debug1: sshd version openssh_4.6p1
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: rexec_argv [0] = '/usr/sbin/sshd'
Debug1: rexec_argv [1] = '-d'
Socket: address family not supported by Protocol
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.
4.2 start the service
#/Usr/sbin/sshd
4.3 check whether there are 22 listening ports
# Netstat-tnlp | grep: 22
TCP 0 0 0.0.0.0: 22 0.0.0.0: * Listen 21018/sshd
4.4 try to log on from the local machine through SSH
# SSH root @ localhost
The authenticity of host 'localhost (127.0.0.1) 'can't be established.
RSA key fingerprint is 03: EB: 80: Fe: 07: D9: 9d: 00: 1c: 15: 37: 93: D1: D3: 8e: 6d.
Are you sure you want to continue connecting (Yes/No )? Yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
Root @ localhost's password:
Last login: Wed Apr 11 11:29:04 2007 from localhost. localdomain
========================================================== ==========================================================
This method cannot be installed on Ubuntu Desktop !!