hey guys i found the solution to dis issue, so like to share it wid all the junos suffering people :
Problem description:
Unable to take ssh
ssh_exchange_identification: Connection closed by remote host.
This can happen due some corrupted files to fix this issue please find the procedure bellow for the EX3200
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
then you have to give reboot
The troubleshooting steps taken for the CORE-switch.
The fingerprint for the RSA key sent by the remote host is
7b:3e:b5:4f:15:3a:38:d1:0e:66:9f:aa:87:af:40:ba.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:9
RSA host key for 10.21.78.170 has changed and you have requested strict checking.
Host key verification failed.
For the above error message
root@SUNNY:RE:0% cd /root/.ssh/
root@SUNNY:RE:0% rm known_hostes
Then you will be able to relogin through the ssh connection.
Regards,
Dil