configure ssh service in linux :

本文详细介绍如何在Linux系统上配置SSH公钥认证,包括安装SSH服务、创建公私钥对、转换公钥格式以适应不同客户端工具、传输密钥文件、配置客户端工具并进行连接测试等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1, make sure the sshd service is installed on system.
service sshd status

2, create public/private key pairs:
ssh-keygen # answer with default value.
3, now private and public key pairs are created as OpenSSH format.

if we use other client tool not ssh program (such as secureCRT,PUTTY)
We must first have a clear concept about the public key format.
In fact, Linux use OpenSSH format ,however Others (windows remote client tools)
use SECSH file format. So if we want use other tool connect to Linux SSHD server,
we should convert public key file from OpenSSH format to SECSH format.
Do it like this:
ssh-keygen -e -f id_rsa > id_rsa1.pub # or like following get the same result.
ssh-keygen -e -f id_rsa.pub > id_rsa1.pub

4, transfer to client . we can use sz/rz tool achieve this.Here we assume you have connected to server by Telnet client tool(secureCRT).
sz id_rsa1.pub

5, add the authorized public key:
cat id_rsa.pub >> authorized_keys

6, configure client tool select ssh2 tool, prioritize "public key" as the first authenticate method.
select the file received from sz( id_rsa1.pub) .

7, try to connect to server. Good Luck !

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/350519/viewspace-1034524/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/350519/viewspace-1034524/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值