Description

Client is unable to log in to an EX switch using SSH or Telnet.

Symptoms

When a client is trying to connect to an EX switch using Telnet or SSH, it might fail with the following error:

ssh_exchange_identification: Connection closed by remote host

Solution

There could be several reasons for this behavior; for example, missing or empty directory under /var/ , an RSA key not being generated, etc.

The following are some possible troubleshooting steps:

  1. Make sure that SSH or Telnet is configured on the EX. If not, configure it using the following commands and commit:

    #set system services ssh
    #set system services telnet
  2. Check the logs messages for the following error: empty directory missing in /var .

    If you see this message, create a directory named “empty” by using following commands:

    >start shell user root :

    Password : ----enter root password---

    - % cd /var
    - % mkdir empty
  3. Try again. If it still does not work, a new RSA and keygen might need to be generated. Regenerate the RSA and DSA keys for SSH with the following commands:

    >start shell user root

    % ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

    You will see this message:

    Generating public/private dsa key pair.
    /etc/ssh/ssh_host_dsa_key already exists.
    Overwrite (y/n)? >>>select yes

    %ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
    Generating public/private dsa key pair.
    /etc/ssh/ssh_host_dsa_key already exists.
    Overwrite (y/n)? >>>select yes
  4. If the issue persists, open a case with your technical support representative.

Modification History

2020-03-27: Article reviewed for accuracy; no changes required.