Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Wed Aug 23, 2017 9:00 am


Author Message
mandrei99
Post  Post subject: Junos: How to disconnect idle ssh connections in configuration mode - Juniper SRX  |  Posted: Tue May 14, 2013 5:40 am

Joined: Tue Aug 04, 2009 9:16 am
Posts: 245

Offline
 

Junos: How to disconnect idle ssh connections in configuration mode - Juniper SRX

Ever saw multiple users connections becoming stale (connection reset at client edge most often) like below:

Code:
Somebody@carter> configure   
Entering configuration mode
Users currently editing the configuration:
  Somebody terminal p0 (pid 8505) on since 2013-04-24 14:27:29 UTC, idle 2w5d 19:02
      [edit]
  Somebody terminal p1 (pid 8524) on since 2013-04-24 14:28:01 UTC, idle 2w5d 19:01
      [edit]
  Somebody terminal p2 (pid 58926) on since 2013-05-14 08:12:42 UTC, idle 01:13:58
      [edit]


This can happen when users close their terminal putty/SecureCRT windows without logging out of Junos or when their connection becomes idle and a firewall on the way resets the session.

There are two ways to address this:
1. activate keepalive for ssh in Junos:
Code:
Somebody@carter# show system services ssh
root-login deny-password;
protocol-version v2;
client-alive-count-max 5;
client-alive-interval 120;

The above settings speak for them selves

and second option is to disconnect/logout idle users in Junos "configuration" mode:
Code:
[edit]
Somebody@carter# status   
Users currently editing the configuration:
  Somebody terminal p1 (pid 58995) on since 2013-05-14 09:30:13 UTC
      [edit]
  Somebody terminal p0 (pid 59294) on since 2013-05-14 09:35:57 UTC
      [edit security]
Somebody@carter# run request system logout pid 59294

One needs to pay attention here not to kill own shell. In my case, current configuration was under "[edit]" and the killed session was under "[edit security]" (Yes, it's an SRX :D).





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "Junos: How to disconnect idle ssh connections in configuration mode - Juniper SRX"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Juniper SRX / Junos rescue configuration is not set

mandrei99

0

3368

Mon Feb 16, 2015 11:42 am

mandrei99 View the latest post

There are no new unread posts for this topic. How to search junos configuration option within cli help apropos

mandrei99

0

837

Mon Jan 12, 2015 12:34 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Junos system configuration archival is not working over scp

mandrei99

0

2948

Thu Jan 01, 2015 4:06 am

mandrei99 View the latest post

There are no new unread posts for this topic. Junos: How to increase the number of configuration rollbacks

admin

0

1441

Wed Nov 05, 2014 11:00 am

admin View the latest post

There are no new unread posts for this topic. Juniper - Junos 11.4R8 based Olive

mandrei99

1

2683

Tue Jun 18, 2013 5:36 am

mandrei99 View the latest post

There are no new unread posts for this topic. MTR / My traceroute in Junos

mandrei99

1

3276

Mon Oct 10, 2016 5:54 am

barrel View the latest post

There are no new unread posts for this topic. Junos: How to show uncommitted changes and cancel them

mandrei99

1

17621

Wed Sep 25, 2013 7:31 am

mandrei99 View the latest post

There are no new unread posts for this topic. Junos: How to list routing table IDs

admin

0

1050

Sat Jan 17, 2015 3:53 pm

admin View the latest post

There are no new unread posts for this topic. Junos - How to limit arguments to ping CLI command

mandrei99

1

874

Thu Jun 27, 2013 4:04 am

admin View the latest post

There are no new unread posts for this topic. Junos: ping: invalid routing instance `RI0'

mandrei99

0

1790

Fri Jan 03, 2014 10:11 am

mandrei99 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO