Junos
Junos

ssh

‎08-18-2019 04:40 AM

Hi all,

 

From windows cli we can do the following cli to see whether or not destination has open port 22 etc....

c:\> telnet 10.10.10.1 22

How  about on the devices running Junos, how can be done the same thing whether or not to see associated remote port is open or not?

 

thx

A.

 

 

6 REPLIES 6
Junos

Re: ssh

‎08-18-2019 04:57 AM

You only need to add 'port' to your telnet command. Example below:

 

 

user@srx> telnet 10.10.15.224 port 22
Trying 10.10.15.224...
Connected to 10.10.15.224.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.0
^C
Connection closed by foreign host.

user@srx>

 

 


--
Best regards,

Jonas Hauge Klingenberg
Systems Engineer, SEC DATACOM A/S (Denmark)
Junos

Re: ssh

‎08-18-2019 06:17 AM

Hello,

 


@Arix wrote:

 

c:\> telnet 10.10.10.1 22

How  about on the devices running Junos, how can be done the same thing whether or not to see associated remote port is open or not?

 

 


 

Generally yes provided Your loopback filter on the originating device allows return TCP packets with src.tcp.port 22 and dst.tcp.port in 1024-65535 range.

Other poster already provided You with JUNOS CLI example.

 

HTH

Thx

Alex

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Junos

Re: ssh

‎08-18-2019 04:18 PM

Thanks for replies...

how about why we can not see all connections on devices that Junos running. For instance, c:\>netstat -a shows all connections including "ESTABLISHED" on the windows machine how about junos devices?

Thx

A.

Junos

Re: ssh

‎08-18-2019 06:16 PM
You can try “show system connections” from the cli

show system connections
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 2 10.219.37.132.23 172.17.28.143.58602 ESTABLISHED
tcp4 0 0 128.0.0.1.6985 128.0.2.21.52226 ESTABLISHED


or you can go to shell and do netstat -a


r2003-re0> start shell
% netstat -a
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 4 10.219.37.132.23 svl-jtac-lnx01.j.58602 ESTABLISHED
tcp4 0 0 128.0.0.1.6985 128-0-2-21.helpn.52226 ESTABLISHED
tcp4 0 0 128.0.0.1.6234

Regards,
Jibu
Junos

Re: ssh

‎08-18-2019 09:39 PM

Thanks reply...

I see...

Can I ask about all connection from the Data and Control Plane sessions are listed via  >show system connections ? Or only control plane connections are listing?

Junos

Re: ssh

‎08-18-2019 09:58 PM
>show system connections
This would show you all the Control Plane sessions .



Regards,
Jibu