Junos OS

last person joined: 5 days ago 

Ask questions and share experiences about Junos OS.
Expand all | Collapse all

Unable to SSH

  • 1.  Unable to SSH

    Posted 10-14-2014 16:51

    Hi all,

     

    I currently have an issue where I am unable to SSH into any of my devices.

     

    I originally had SSH running and working great, however a collegue decided we didn't need it and promptly deleted it from the configs of all devices.

     

    Now, when I am trying to setup Junos Space, I have put SSH and Netconf SSH back into system services but it doesn't seem to have worked. I am unable to SSH from my PC into the devices, and when I try to SSH from device to device (which previously worked) I get the message "-cli: unable to execute ssh: No such file or directory".

     

    Any help would be much appreciated. Thank you.

     

     



  • 2.  RE: Unable to SSH

    Posted 10-15-2014 02:20

    Have you reviewed your policy? it may have been disabled.



  • 3.  RE: Unable to SSH

    Posted 10-15-2014 17:02

    It's not mentioned in the policy anywhere. Thanks though!



  • 4.  RE: Unable to SSH

    Posted 10-15-2014 17:47

    I assume you have the web interface turned off as well?



  • 5.  RE: Unable to SSH

    Posted 10-15-2014 17:53

    Yes, web interface is turned off.



  • 6.  RE: Unable to SSH

    Posted 10-15-2014 17:54

    http://forums.juniper.net/t5/Ethernet-Switching/Lost-SSHD-daemon-on-virtual-chassis-help/td-p/125497

     

    "

    Re: Lost SSHD daemon on virtual chassis ! help !

    [ New ]

    For anyone else who comes across this issue here is a detailed explanation of the solution:

     

    From the shell:

     

    type: /usr/sbin/sshd (if you are not missing any folders it will start, otherwise it will come back with a path of the missing folder)

     

    In my case we were missing a 'permissions separation' folder located in /var named empty

     

    create the directory and run the /usr/sbin/sshd command again.

    "

     



  • 7.  RE: Unable to SSH

    Posted 10-15-2014 18:01

    Hi agarrison,

     

    This seems to be going down the right track, but I get the following error when I try and run that command;

     

    /usr/sbin/sshd: Command not found.

     



  • 8.  RE: Unable to SSH

    Posted 10-15-2014 18:09

    agarrison@firewall> start shell
    % /usr/sbin/sshd
    Could not load host key: /etc/ssh/ssh_host_rsa_key
    Could not load host key: /etc/ssh/ssh_host_dsa_key
    Could not load host key: /etc/ssh/ssh_host_ecdsa_key
    Disabling protocol version 2. Could not load host key
    sshd: no hostkeys available -- exiting.

     

    you tried from the shell?

    I got this message but I log in using sshv2, strange



  • 9.  RE: Unable to SSH

    Posted 10-15-2014 18:11

    Here are the files I have listed in that directory

     

    % ls /etc/ssh/
    primes ssh_host_ecdsa_key.pub ssh_host_rsa_key.pub
    ssh_host_dsa_key ssh_host_key ssh_known_hosts
    ssh_host_dsa_key.pub ssh_host_key.pub
    ssh_host_ecdsa_key ssh_host_rsa_key
    %



  • 10.  RE: Unable to SSH

    Posted 10-15-2014 18:13

    Yeah that's what it said from the shell. If I dig down into that folder I cannot find 'sshd'. Is there anyway to reinstall it?



  • 11.  RE: Unable to SSH

    Posted 10-15-2014 18:15

    You have the domestic version?



  • 12.  RE: Unable to SSH



  • 13.  RE: Unable to SSH

     
    Posted 10-15-2014 17:49

    Hi,

     

    As a starter, can you provide "show version", "show configuration system services", and "file list detail /var/empty/" output?

     

    Regards,

    /Charlie



  • 14.  RE: Unable to SSH

    Posted 10-15-2014 17:57

    show version:

     

    Model: mx5-t
    Junos: 13.3R1.8
    JUNOS Base OS boot [13.3R1.8]
    JUNOS Base OS Software Suite [13.3R1.8]
    JUNOS Kernel Software Suite [13.3R1.8]
    JUNOS Packet Forwarding Engine Support (MX80) [13.3R1.8]
    JUNOS Online Documentation [13.3R1.8]
    JUNOS Services Application Level Gateways [13.3R1.8]
    JUNOS Services Jflow Container package [13.3R1.8]
    JUNOS Services Stateful Firewall [13.3R1.8]
    JUNOS Services NAT [13.3R1.8]
    JUNOS Services RPM [13.3R1.8]
    JUNOS Routing Software Suite [13.3R1.8]
    

     show configuration system services

     

    ftp;
    ssh;
    telnet;
    netconf {
        ssh;
    }
    

    file list detail /var/empty/

     

    /var/empty/:
    total blocks: 8
    total files: 0

     

     

    I should note that this error is also the case on my ACX1100 devices. Thank you.



  • 15.  RE: Unable to SSH

     
    Posted 10-15-2014 18:15

    Thare are no Crpyto packages there in your show version output. It is be expected if it is export version I guess. However if it was working in the past, it is puzzling how it got removed. I guess you need to add Crypto package either separately or by system upgrade.

     

    ckim@wf-pacman-sw3> show version |match Crypto 
    JUNOS Crypto Software Suite [12.3R2.5]
    
    

     

    ckim@vmx-ce1> show version |match Crypto 
    JUNOS Crypto Software Suite [14.2-20140916.0]
    JUNOS Services Crypto Base PIC package [14.2-20140916.0]
    JUNOS Services Crypto Base PIC package [14.2-20140916.0]
    JUNOS Services Crypto Base PIC package(xlr64) [14.2-20140916.0]
    

     

     

    Regards,

    /Charlie