Linux下安装OpenSSH
来源:互联网 发布:淘宝的福袋能买吗 编辑:程序博客网 时间:2024/05/02 02:36
因为自己的傻,所以才有的此篇日志。也许有人可以发现,在我博客上已经有篇名为“LFS配置IP及安装OpenSSH”,而再写这篇日记是因为自己在Linux下使用了光盘里的OpenSSH,然后装上后使用自己硬盘上的SSH时老是提示已经占用,结果反复装了好几遍才意识到这个问题!~这就好比一个人骑在马上数马的数目一样,总是少一头。哎,悲剧。
切入正题。
下载openssl-0.9.8e.tar.gz包和openssh-4.6p1.tar.gz包。先装SSL。
安装openssl
#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 /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
配置库文件搜索路径
#echo ”/usr/local/ssl/lib” >> /etc/ld.so.conf
#ldconfig -v
查看openssl的版本号,以验正是否安装正确
#openssl version -a
OpenSSL 0.9.8e 11 Apr 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 -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
OPENSSLDIR: ”/usr/local/ssl”
安装OpenSSH
#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
查看openssh版本号,验正安装结果
# ssh -v
OpenSSH_4.6p1, OpenSSL 0.9.8e 11 Apr 2007
usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-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]
调试启动,如果以下显示均正常,就可以正常启动sshd了。
#/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.
启动服务
#/usr/sbin/sshd
OK了~如果遇见了问题欢迎留言,我反正是给这个OpenSSH给弄得头破血流了~
超越C++原创文章,转载请注明来源并保留原文链接
本文链接:http://www.beyondc.cn/linux-install-openssh.html
- Linux下安装OpenSSH
- linux下安装openssh-server
- linux 下 OpenSSH的安装和使用
- linux下升级openssh
- Linux安装OpenSSH Server
- linux openssh源码安装
- windows下安装cygwin+openssh
- Ubuntu 下安装使用 OpenSSH
- Ubuntu 下安装 OpenSSH Server
- linux 安装openssl和openssh
- 在windows下安装和使用openssh
- Ubuntu下安装和配置OpenSSH
- ubuntu下 安装和设置 OpenSSH Server
- CentOS命令行模式下安装openssh客户端
- ubuntu 下安装 install openssh-server
- linux下升级openssh参考[不建议采用此法安装]
- Linux-3.x离线安装openssh
- Linux Ubuntu 15.04 快速安装OPENSSH
- 关于有状态类与集群
- 做自己
- ps -ef|grep ssh
- windows下MySQL5绿色版的安装方法
- 日常电脑技巧
- Linux下安装OpenSSH
- 存储过程的优点
- PP Tcode
- 用一个变量去取名与其值相同的变量的值
- 使用系统菜单作为上下文菜单
- 企业网站的搜索引擎营销策略分析
- ulimit 解决 Nginx accept() failed (24: Too many open files) 错误
- 孟非
- Studying note of GCC-3.4.6 source (27)