Config Router

  • Google Sheets
  • CCNA Online training
    • CCNA
  • CISCO Lab Guides
    • CCNA Security Lab Manual With Solutions
    • CCNP Route Lab Manual with Solutions
    • CCNP Switch Lab Manual with Solutions
  • Juniper
  • Linux
  • DevOps Tutorials
  • Python Array
You are here: Home / Juniper / SSH to device does not work

SSH to device does not work

May 29, 2016 by James Palmer

This article talks about the error one gets while accessing the device through ssh and how to resolve the issue

Suppose one tries to ssh the device to one of the interface ip address of the SRX on which ssh is enabled. The ssh connection is not successful and the below error message could be seen in the log messages

root@frsar01fwl02> show log messages | match "host key" 
Sep 27 12:00:11  frsar01fwl02 sshd[12511]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
Sep 27 12:00:11  frsar01fwl02 sshd[12511]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
Sep 27 12:00:17  frsar01fwl02 sshd[12516]: error: Could not load host key: /etc/ssh/ssh_host_key
Sep 27 12:00:17  frsar01fwl02 sshd[12516]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
Sep 27 12:00:17  frsar01fwl02 sshd[12516]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
Sep 27 12:00:17  frsar01fwl02 sshd[12516]: Disabling protocol version 1. Could not load host key

The reason is that when a proper closure of the session does not take place i…e The session is not logged out by the typing command exit and instead the window is directly close and thus it stores the key with which the user logged in .Thus when the user tries to loging again a different cryptograhic vlaue of the password which is entered is genretaed and it tries to match the stored key which reults in the device to not accept the ssh request.

Command to view the stored key

root@240-2> file list /cf/root/.ssh 
authorise_key
authorise_key2

Thus when the above command shows the below set of values it means that it would not accept the ssh request.

Thus we need to clear the stored keys as mentioned below

root@240-2> file delete /cf/root/.ssh/authorise_key
root@240-2> file delete /cf/root/.ssh/authorise_key2

Once this command is executed the ssh request is accepted.

Related

Filed Under: Juniper Tagged With: SRX, SSH, ssshd

Recent Posts

  • How do I give user access to Jenkins?
  • What is docker volume command?
  • What is the date format in Unix?
  • What is the difference between ARG and ENV Docker?
  • What is rsync command Linux?
  • How to Add Music to Snapchat 2021 Android? | How to Search, Add, Share Songs on Snapchat Story?
  • How to Enable Snapchat Notifications for Android & iPhone? | Steps to Turn on Snapchat Bitmoji Notification
  • Easy Methods to Fix Snapchat Camera Not Working Black Screen Issue | Reasons & Troubleshooting Tips to Solve Snapchat Camera Problems
  • Detailed Procedure for How to Update Snapchat on iOS 14 for Free
  • What is Snapchat Spotlight Feature? How to Make a Spotlight on Snapchat?
  • Snapchat Hack Tutorial 2021: Can I hack a Snapchat Account without them knowing?

Copyright © 2025 · News Pro Theme on Genesis Framework · WordPress · Log in