Junipor交换机 ssh_exchange_identification: Connection closed by remote host

可根据以下步骤使其ssh服务恢复正常:

Step1 check the files are present in the directory by login in to the switch and you should be in the shell

root@SUNNY:RE:0% ls /etc/ssh/ssh*
/etc/ssh/ssh_host_dsa_key       /etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_dsa_key.pub   /etc/ssh/ssh_host_rsa_key.pub
/etc/ssh/ssh_host_key           /etc/ssh/ssh_known_hosts
/etc/ssh/ssh_host_key.pub

root@SUNNY:RE:0% ls /config/ssh*
/config/ssh_host_dsa_key        /config/ssh_host_key
/config/ssh_host_dsa_key.pub    /config/ssh_host_key.pub
/config/ssh_host_ecdsa_key      /config/ssh_host_rsa_key
/config/ssh_host_ecdsa_key.pub  /config/ssh_host_rsa_key.pub




Step 2 Make two directory under the /etc/ by following  command

root@SUNNY:RE:0% cd /etc
root@SUNNY:RE:0% mkdir test1
root@SUNNY:RE:0% mkdir test2
root@SUNNY:RE:0% ls ----- by issuing this command you will be able to see the directory test under /etc

fbtab                   newsyslog.conf.sys      sshd_netconf
fstab                   notices                 stunnel.conf
ftpusers                pam.conf                syslog.conf
gettytab                pam.conf.sys            termcap
group                   passwd                  termcap.small
group.sys               profile                test1
test2

step3 copy the files under /etc/ssh/ssh* to the directory test1 and also copy /config/ssh* to directory test2

root@SUNNY:RE:0% cp /etc/ssh/ssh* /etc/test1
root@SUNNY:RE:0% cp /config/ssh* /etc/test2
root@SUNNY:RE:0% ls /etc/test1
root@SUNNY:RE:0% ls /etc/test2

Step4 then you have to create a directory under the /var/
root@SUNNY:RE:0% cd /var/
root@SUNNY:RE:0% mkdir empty

重启交换机:

request system reboot

后可正常登陆

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值