Switching

last person joined: yesterday 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
Expand all | Collapse all

SSH on EX4200

  • 1.  SSH on EX4200

    Posted 12-24-2013 23:53

    Hi all,

     

    I have configured SSHv2 and telnet on EX4200 (two EX4200 configured as virtual chassis):

     

    set system services ssh root-login allow
    set system services ssh protocol-version v2
    set system services telnet

     

    I can telnet to EX4200 but not ssh. Terminal program shows "Connection closed".

     

    So what to do, check ?

     

    Thanks

     

     



  • 2.  RE: SSH on EX4200

    Posted 12-25-2013 04:02

    You need to enable ssh in addition to setting those specific options.

     

    set system services ssh



  • 3.  RE: SSH on EX4200

    Posted 12-25-2013 09:48

    Hi,

     

    Its an issue of memory

     

    please run the command below first

     

    >request system storage cleanup dry-run

     

    After this check memory and run below it will work.

     

    >request system storage cleanup

     

    <yes/no>  yes

     

     

     

    Accept as a solution and kudos always been appreciated



  • 4.  RE: SSH on EX4200

    Posted 12-25-2013 22:50

    Thanks Jaishan,

     

    If I run that commands, it will interupt operation of switch sometime or not ?



  • 5.  RE: SSH on EX4200

    Posted 12-25-2013 22:59

    No interruption will happen to your current traffic and device. Its safe .



  • 6.  RE: SSH on EX4200

    Posted 12-26-2013 01:26

    request system storage cleanup didn't help. 

    Situation is the same.



  • 7.  RE: SSH on EX4200

    Posted 12-26-2013 01:35

    please paste the command output for below here 

     

    Request system storage cleanup dry-run

    and 

    show system services 



  • 8.  RE: SSH on EX4200

    Posted 12-26-2013 01:39

    > request system storage cleanup dry-run
    fpc0:
    --------------------------------------------------------------------------

    List of files to delete:

    Size Date Name
    141B Dec 26 09:37 /var/log/default-log-messages.0.gz
    651B Dec 26 09:37 /var/log/interactive-commands.0.gz
    129B Dec 26 09:37 /var/log/messages.0.gz
    27B Dec 26 09:37 /var/log/wtmp.0.gz

    fpc1:
    --------------------------------------------------------------------------

    List of files to delete:

    Size Date Name
    141B Dec 26 09:37 /var/log/default-log-messages.0.gz
    641B Dec 26 09:37 /var/log/interactive-commands.0.gz
    162B Dec 26 09:37 /var/log/messages.0.gz
    27B Dec 26 09:37 /var/log/wtmp.0.gz
    27B Dec 26 09:36 /var/log/wtmp.1.gz

     

     

    # show system services
    ssh {
    root-login allow;
    protocol-version v2;
    }
    telnet;

     



  • 9.  RE: SSH on EX4200

    Posted 12-26-2013 01:45

    Hi what username you are using to login through SSH?? root or some other ?? By default root is only allow and you have mentioned that only. please check with your root username and password.



  • 10.  RE: SSH on EX4200

    Posted 12-26-2013 02:30

    I have replaced

    set system services ssh root-login allow
    set system services ssh protocol-version v2

     

    with

    set system services ssh

     

    But result is the same. Terminal program shows only "Connection closed." and nowhere I can input login and password.

    SSH was working with that configuration on that EX4200 but now isn't.

    Telnet is working but SSH is needed.



  • 11.  RE: SSH on EX4200

    Posted 12-26-2013 03:13

    also 

     

    show system processes extensive



  • 12.  RE: SSH on EX4200

    Posted 12-26-2013 03:24

    On EX4200 there isn't show configuration security zones security-zone trust command.

     

     

     

    > show system processes extensive
    last pid: 25828; load averages: 0.08, 0.02, 0.01 up 37+21:40:06 11:23:32
    122 processes: 3 running, 98 sleeping, 21 waiting

    Mem: 255M Active, 151M Inact, 40M Wired, 208M Cache, 110M Buf, 327M Free
    Swap:


    PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
    11 root 1 171 52 0K 16K RUN 824.9H 95.26% idle
    942 root 1 8 0 85676K 10864K nanslp 33.0H 0.05% pfem
    940 root 2 8 -88 68800K 10820K nanslp 17.3H 0.00% sfid
    939 root 1 4 0 15900K 8436K kqread 17.0H 0.00% chassism
    12 root 1 -20 -139 0K 16K RUN 368:36 0.00% swi7: clock
    14 root 1 -40 -159 0K 16K WAIT 65:10 0.00% swi2: net
    1042 root 1 96 0 6436K 2492K select 44:05 0.00% ppmd
    941 root 1 4 -20 7856K 6276K kqread 41:30 0.00% vccpd
    1055 root 1 96 0 6936K 1624K select 39:22 0.00% license-check
    1052 root 1 4 0 14516K 12512K kqread 38:28 0.00% eswd
    1026 root 1 96 0 23708K 16620K select 37:26 0.00% chassisd
    1051 root 1 4 0 8548K 6604K kqread 22:23 0.00% lldpd
    22 root 1 -52 -171 0K 16K WAIT 18:13 0.00% irq43: i2c0 i2c1
    1033 root 1 96 0 19728K 17356K select 15:41 0.00% snmpd
    1027 root 1 96 0 7432K 5884K select 12:15 0.00% alarmd
    31 root 1 -68 -187 0K 16K WAIT 11:39 0.00% irq2: mpfe1
    30 root 1 -68 -187 0K 16K WAIT 10:26 0.00% irq3: mpfe0
    8 root 1 171 52 0K 16K pgzero 8:14 0.00% pagezero
    1035 root 1 4 0 39136K 18880K kqread 7:58 0.00% rpd
    51 root 1 12 0 0K 16K - 5:40 0.00% schedcpu
    41 root 1 -16 0 0K 16K psleep 4:50 0.00% vmkmemdaemon
    36 root 1 20 0 0K 16K syncer 4:00 0.00% syncer
    1054 root 1 4 0 6112K 4452K kqread 3:56 0.00% mcsnoopd
    1044 root 1 96 0 8120K 6468K select 3:39 0.00% bfdd
    1025 root 1 96 0 25252K 8928K select 3:33 0.00% dcd
    2 root 1 -8 0 0K 16K - 3:30 0.00% g_event
    1032 root 1 96 0 2620K 1704K select 3:14 0.00% ntpd
    15 root 1 -16 0 0K 16K - 3:10 0.00% yarrow
    38 root 1 20 0 0K 16K vnlrum 2:49 0.00% vnlru_mem
    1038 root 1 96 0 11372K 7984K select 2:36 0.00% pfed
    4 root 1 -8 0 0K 16K - 2:34 0.00% g_down
    3 root 1 -8 0 0K 16K - 2:24 0.00% g_up
    1049 root 1 96 0 8560K 6432K select 2:15 0.00% pkid
    1029 root 1 96 0 5568K 1948K select 2:15 0.00% lfmd
    1053 root 1 4 0 6120K 3948K kqread 2:13 0.00% sflowd
    1034 root 1 96 0 13792K 10992K select 2:06 0.00% mib2d
    1030 root 1 4 0 6712K 4764K kqread 2:00 0.00% cfmd
    39 root 1 -16 0 0K 16K sdflus 1:57 0.00% softdepflush
    692 root 1 96 0 5648K 2528K select 1:54 0.00% eventd
    935 root 1 96 0 2032K 936K select 1:34 0.00% tnetd
    1046 root 1 96 0 9600K 7088K select 1:30 0.00% lacpd
    1040 root 1 96 0 8204K 6460K select 1:17 0.00% rmopd
    1041 root 1 96 0 13112K 9516K select 1:14 0.00% cosd
    1028 root 1 96 0 7136K 1704K select 1:07 0.00% craftd
    1092 root 1 4 0 0K 16K peer_s 0:52 0.00% peer proxy
    1063 root 1 4 0 0K 16K peer_s 0:33 0.00% peer proxy
    780 root 1 8 0 2008K 648K nanslp 0:29 0.00% cron
    9 root 1 -16 0 0K 16K psleep 0:26 0.00% bufdaemon
    6 root 1 8 0 0K 16K - 0:20 0.00% kqueue taskq
    37 root 1 -4 0 0K 16K vlruwt 0:18 0.00% vnlru
    26 root 1 -68 -187 0K 16K WAIT 0:17 0.00% irq30: tsec0
    46 root 1 -16 0 0K 16K psleep 0:16 0.00% vmuncachedaemon
    1043 root 1 96 0 11404K 7768K select 0:14 0.00% dfwd
    936 root 1 96 0 25148K 17284K select 0:11 0.00% mgd
    1056 root 1 4 0 0K 16K peer_s 0:06 0.00% peer proxy
    1039 root 1 4 0 0K 16K peer_s 0:06 0.00% peer proxy
    1024 root 1 96 0 1808K 648K select 0:05 0.00% watchdog
    943 root 1 8 0 2112K 956K nanslp 0:05 0.00% getty
    1036 root 1 4 0 0K 16K peer_s 0:05 0.00% peer proxy
    132 root 1 -8 0 0K 16K mdwait 0:05 0.00% md6
    24 root 1 -64 -183 0K 16K WAIT 0:05 0.00% irq6: ehci0+
    944 root 1 8 0 2112K 956K nanslp 0:04 0.00% getty
    7 root 1 -16 0 0K 16K psleep 0:04 0.00% pagedaemon
    25 root 1 -68 -187 0K 16K WAIT 0:04 0.00% irq29: tsec0
    155 root 1 -8 0 0K 16K mdwait 0:04 0.00% md8
    1037 root 1 4 0 1808K 688K sbwait 0:04 0.00% tnp.sntpd
    1031 root 1 4 0 0K 16K peer_s 0:03 0.00% peer proxy
    178 root 1 -8 0 0K 16K mdwait 0:03 0.00% md10
    52 root 1 -8 0 0K 16K mdwait 0:02 0.00% md0
    16 root 1 -28 -147 0K 16K WAIT 0:02 0.00% swi5: cambio
    1045 root 1 96 0 7828K 5164K select 0:01 0.00% rdd
    201 root 1 -8 0 0K 16K mdwait 0:01 0.00% md12
    1 root 1 8 0 1440K 660K wait 0:00 0.00% init
    86 root 1 -8 0 0K 16K mdwait 0:00 0.00% md2
    937 root 1 96 0 3756K 1316K select 0:00 0.00% inetd
    124 root 1 -8 0 0K 16K mdwait 0:00 0.00% md5
    28 root 1 8 0 0K 16K usbevt 0:00 0.00% usb0
    25820 Administration 1 96 0 21360K 13576K select 0:00 0.00% cli
    1048 root 1 96 0 12564K 4456K select 0:00 0.00% shm-rtsdbd
    224 root 1 -8 0 0K 16K mdwait 0:00 0.00% md14
    170 root 1 -8 0 0K 16K mdwait 0:00 0.00% md9
    193 root 1 -8 0 0K 16K mdwait 0:00 0.00% md11
    109 root 1 -8 0 0K 16K mdwait 0:00 0.00% md4
    147 root 1 -8 0 0K 16K mdwait 0:00 0.00% md7
    216 root 1 -8 0 0K 16K mdwait 0:00 0.00% md13
    78 root 1 -8 0 0K 16K mdwait 0:00 0.00% md1
    101 root 1 -8 0 0K 16K mdwait 0:00 0.00% md3
    23 root 1 -48 -167 0K 16K WAIT 0:00 0.00% swi0: uart uart
    25813 root 1 8 0 2832K 1500K wait 0:00 0.00% login
    1050 root 1 101 0 3148K 1120K select 0:00 0.00% vchassis-diagd
    1047 root 1 101 0 7184K 4680K select 0:00 0.00% sendd
    25812 root 1 96 0 2380K 1208K select 0:00 0.00% telnetd
    25821 root 1 96 0 25208K 2736K select 0:00 0.00% mgd
    255 root 1 -8 0 0K 16K mdwait 0:00 0.00% md15
    310 root 1 -8 0 0K 16K mdwait 0:00 0.00% md16
    25828 root 1 98 0 22984K 1456K RUN 0:00 0.00% top
    43 root 1 4 0 0K 16K sbwait 0:00 0.00% devrt_kernel_thread
    79118 root 1 5 0 2116K 948K ttyin 0:00 0.00% getty
    42 root 1 4 0 0K 16K pfeacc 0:00 0.00% if_pic_listen0
    0 root 1 12 0 0K 0K WAIT 0:00 0.00% swapper
    45 root 1 4 0 0K 16K pfeacc 0:00 0.00% if_pfe_listen
    5 root 1 8 0 0K 16K - 0:00 0.00% thread taskq
    48 root 1 8 0 0K 16K - 0:00 0.00% nfsiod 1
    47 root 1 8 0 0K 16K - 0:00 0.00% nfsiod 0
    40 root 1 108 0 0K 16K sleep 0:00 0.00% netdaemon
    49 root 1 8 0 0K 16K - 0:00 0.00% nfsiod 2
    50 root 1 8 0 0K 16K - 0:00 0.00% nfsiod 3
    44 root 1 4 0 0K 16K dump_r 0:00 0.00% kern_dump_proc
    29 root 1 8 0 0K 16K usbtsk 0:00 0.00% usbtask
    10 root 1 -16 0 0K 16K ktrace 0:00 0.00% ktrace
    18 root 1 -12 -131 0K 16K WAIT 0:00 0.00% swi9: +
    17 root 1 -12 -131 0K 16K WAIT 0:00 0.00% swi9: task queue
    19 root 1 -16 -135 0K 16K WAIT 0:00 0.00% swi8: +
    13 root 1 -24 -143 0K 16K WAIT 0:00 0.00% swi6: vm
    34 root 1 -32 -151 0K 16K WAIT 0:00 0.00% swi4: ip6mismatch+
    33 root 1 -36 -155 0K 16K WAIT 0:00 0.00% swi3: ip6opt ipopt
    35 root 1 -44 -163 0K 16K WAIT 0:00 0.00% swi1: ipfwd
    20 root 1 -52 -171 0K 16K WAIT 0:00 0.00% irq16: memctl0
    21 root 1 -52 -171 0K 16K WAIT 0:00 0.00% irq18: memctl0
    32 root 1 -68 -187 0K 16K WAIT 0:00 0.00% irq20: idma0
    27 root 1 -68 -187 0K 16K WAIT 0:00 0.00% irq34: tsec0

     

     

     



  • 13.  RE: SSH on EX4200

    Posted 12-26-2013 03:38

    sorry about that, out of my mind thats a switch , please check and configure 

     

    set system services ssh protocol-version v1

     

     

    and check..



  • 14.  RE: SSH on EX4200

    Posted 12-26-2013 05:54

    And with SSHv1 I can't login Smiley Sad



  • 15.  RE: SSH on EX4200

    Posted 12-26-2013 07:29

    please follow this:

     

    Login through telnet:

     

    >start shell user root

    password: enter it

    % cd /var

     

    Thank please find the mkdir directory using "ls" command and empty the mkdir and now ssh will surely work.

     

     

    please accept this as a solution and kudos always appreciated.



  • 16.  RE: SSH on EX4200

    Posted 12-26-2013 21:23

    Dear Jaishan,

     

    Please discribe your this comment more detailly (step-by-step):

     

    % cd /var

     

    "Thank please find the mkdir directory using "ls" command and empty the mkdir "

     

    Thanks



  • 17.  RE: SSH on EX4200

    Posted 12-26-2013 22:14

    sorry :

     

    u have to go to the /var / directory using the below command 

    cd /var/

     

    and empty it.

     



  • 18.  RE: SSH on EX4200

     
    Posted 12-26-2013 23:12

    And with that advice, I suggest the OP open a ticket with JTAC and stop reading this thread before they damage thier system.



  • 19.  RE: SSH on EX4200

    Posted 12-26-2013 23:25

    Hi Smicker,

     

    I was verymust surprised , was it a warning ?? If i have suggested wrong somewhere please explain.Cause as i confirmed if you empty the var/home directory it resolves the problem. 



  • 20.  RE: SSH on EX4200

    Posted 12-27-2013 00:14

    With cd /var/ I will go to var directory.

    What delete there?



  • 21.  RE: SSH on EX4200

    Posted 12-27-2013 00:48

    after going there please run command 

     

    ls-l

     

    and post it here.



  • 22.  RE: SSH on EX4200

    Posted 12-27-2013 01:01

    root@switch:RE:0% ls-l
    ls-l: Command not found.



  • 23.  RE: SSH on EX4200

    Posted 12-27-2013 01:06

    root@switch:RE:0% cd /var/

    root@switch:RE:0% ls -l



  • 24.  RE: SSH on EX4200

    Posted 12-27-2013 01:06

    or simply type ls



  • 25.  RE: SSH on EX4200

    Posted 12-27-2013 01:44

    root@switch:RE:0% cd /var
    root@switch:RE:0% pwd
    /var
    root@switch:RE:0% ls
    crash db home lost+found rundb
    cron etc log run tmp
    root@switch:RE:0%
    root@switch:RE:0% ls -l
    total 44
    drwxr-xr-x 2 root wheel 512 Oct 27 2012 crash
    drwx------ 3 root wheel 512 Oct 27 2012 cron
    drwxr-xr-x 4 root wheel 512 Dec 27 09:38 db
    drwxr-xr-x 5 root wheel 1536 Dec 26 13:49 etc
    drwxr-xr-x 4 root wheel 512 Oct 27 2012 home
    drwxr-xr-x 2 root wheel 1024 Dec 26 09:37 log
    drwx------ 43 root wheel 2048 Dec 26 09:17 lost+found
    drwxr-xr-x 3 root wheel 3072 Dec 26 13:49 run
    drwxrwxrwt 4 root config 512 Oct 27 2012 rundb
    drwxrwxrwt 6 root field 1024 Dec 26 09:17 tmp



  • 26.  RE: SSH on EX4200

    Posted 12-27-2013 02:19

    now delete the home directory files or whole home directory

     

    % empty home

     

    or rm home



  • 27.  RE: SSH on EX4200
    Best Answer

    Posted 12-27-2013 02:33

    Hi please do this and finish it.

     

    root# run start shell user root

    root:o% cd /var

    root:o% pwd
    /var

    root:o% mkdir empty

     

    root:o% ls -al

     

     

     

    It will solve your problem for sure. accept as a solution. please

     



  • 28.  RE: SSH on EX4200

    Posted 12-27-2013 02:53

    Thanks Jaishan,

     

    SSH now is OK Smiley Wink



  • 29.  RE: SSH on EX4200

    Posted 12-27-2013 02:59

    please accept that as a solution and kudos will be appreciated pretty much( click * on profile icon )



  • 30.  RE: SSH on EX4200

     
    Posted 12-27-2013 05:33
    "I was verymust surprised , was it a warning ?? If i have suggested wrong somewhere please explain.Cause as i confirmed if you empty the var/home directory it resolves the problem. "

    First you instructed to empty the mkdir directory (?) then to empty /var. So yes, that was a warning.



  • 31.  RE: SSH on EX4200

     
    Posted 12-28-2013 01:37

    I agree to smicker. It was lucky that the problem was resolved without accident.

     

    The solution was to invoke "mkdir /var/empty", but he instructed to empty /var folder. He didnt posess some *nix basic, and I assume he didn't know what he was doing.

     

    /Charlie