CentOS中如何使用OpenSSL编译安装OpenSSH?本篇文章为大家分享一下CentOS下使用OpenSSL编译安装OpenSSH具体方法,有需要的小伙伴可以参考一下。
成都创新互联公司是一家集网站建设,武城企业网站建设,武城品牌网站建设,网站定制,武城网站建设报价,网络营销,网络优化,武城网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。
# rpm -qa | grep openssh openssh
# rpm -qa | grep openssh openssl
卸载用rpm -e 如果出现依赖包导致无法卸载,在最后面加上–nodeps即可,例:
# rpm -e openssl --nodeps
具体安装过程如下:
http://ftp5.usa.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.3p1.tar.gz
http://www.openssl.org/source/openssl-1.0.2j.tar.gz
http://www.openssl.org/source/openssl-fips-2.0.13.tar.gz
# yum install -y zlib-devel pam-devel tcp_wrappers-devel
具体说明见 http://www.openssl.org/docs/fips ;
# tar zxpf openssl-fips-2.0.5.tar.gz
# cd openssl-fips
# ./config
# make && make install
# tar zxpf openssl-1.0.1h.tar.gz
# cd openssl-1.0.1h
# ./config fips --shared
# make && make install
# echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
# ldconfig
# tar zxpf openssh-6.6p1.tar.gz
# cd openssh-6.6p1
# ./configure \
--prefix=/usr \
--sysconfdir=/etc/ssh \
--with-md5-passwords \
--with-pam \
--with-tcp-wrappers \
--with-ssl-dir=/usr/local/ssl
# make && make install
# ssh -V
修改相关配置
# cp -p contrib/redhat/sshd.init /etc/init.d/sshd (此处的contrib路径为解压后的OpenSSH包路径)# chmod u+x /etc/init.d/sshd (加执行权限)# chkconfig --add sshd (增加sshd服务)# chkconfig sshd on (把sshd加入启动项)# yum install openssh (安装OpenSSH客户端)# vim /etc/ssh/sshd_configPermitRootLogin yes #允许root账户登录,单root账户必须加上,其他的参数请自行修改
# /etc/init.d/sshd start
ssh-keygen: illegal option -- A
Usage: ssh-keygen [options]
Options:
-a trials Number of trials for screening DH-GEX moduli.
-B Show bubblebabble digest of key file.
-b bits Number of bits in the key to create.
-C comment Provide new comment.
-c Change comment in private and public key files.
-e Convert OpenSSH to IETF SECSH key file.
-F hostname Find hostname in known hosts file.
-f filename Filename of the key file.
-G file Generate candidates for DH-GEX moduli.
-g Use generic DNS resource record format.
-H Hash names in known_hosts file.
-i Convert IETF SECSH to OpenSSH key file.
-l Show fingerprint of key file.
-M memory Amount of memory (MB) to use for generating DH-GEX moduli.
-N phrase Provide new passphrase.
-P phrase Provide old passphrase.
-p Change passphrase of private key file.
-q Quiet.
-R hostname Remove host from known_hosts file.
-r hostname Print DNS resource record.
-S start Start point (hex) for generating DH-GEX moduli.
-T file Screen candidates for DH-GEX moduli.
-t type Specify type of key to create.
-v Verbose.
-W gen Generator to use for generating DH-GEX moduli.
-y Read private key file and print public key.
Starting sshd: [ OK ]
sshd文件的ssh-keygen参数有问题,暂时不知道怎么解决,但是不影响使用。
本文题目:CentOS下使用OpenSSL编译安装OpenSSH具体方法
分享网址:http://www.36103.cn/qtweb/news37/24437.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联