Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Secure Shell

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2018, 07:57 PM
nolan.rumble nolan.rumble is offline
Registered User
 
Join Date: Nov 2010
Posts: 13
Command Window Interactivity

Hi,

I'm utilizing the command window to send multiple commands through to single/multiple SSH sessions. However if I haven't prepared the commands exactly, sometimes the device sends an error back but SecureCRT still continues with sending all the commands through to the device.

Is there a way to abort the full send of commands if SecureCRT detects any errors in the resulting output?

An example would be configuring a Cisco router/firewall where before any commands are accepted, you need to be in "configure terminal" mode.

Let me know if you have any questions.

Thanks!
Nolan
Reply With Quote
  #2  
Old 08-15-2018, 07:44 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,997
Hi Nolan,

What version of SecureCRT are you using?

Changes in SecureCRT 8.0 (Beta 1) -- January 28, 2016 (8.0.0.1011)
-----------------------------------------------------
New features:
  • Added a "Send Characters Immediately" mode to the Command window, which makes it possible to do the following in one or multiple sessions: stop commands using CTRL+C, edit files using an editor such as vi, send escape sequences, and do tab completion.
If v8.0 or later, if you enable Send Characters Immediately, issuing a Ctrl+C should interrupt the output. (It did in my tests to Linux remotes.)
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 08-15-2018, 06:21 PM
nolan.rumble nolan.rumble is offline
Registered User
 
Join Date: Nov 2010
Posts: 13
Hi Brenda,

I'm running latest version.

I didn't know about the CTRL+C option. I'll try that next time.

What about the interactivity question? Is there a way to "program" the command window to automatically break from sending the whole set of commands when a command is sent and the remote device sends an error back?

Let me know if you have any other questions.

Thanks!
Nolan
Reply With Quote
  #4  
Old 08-16-2018, 08:44 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,997
Hi Nolan,

Sorry, I didn't realize the perspective on that inquiry was of a programmatic nature. It's not possible at this time. The interaction is not really bi-directional when using Command window. There might be *some scripting solution* (or a feature request) possible, but I'm not sure how feasible it is.

What sort of errors do you expect?

Is the error received always the same?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 08-20-2018, 02:20 PM
nolan.rumble nolan.rumble is offline
Registered User
 
Join Date: Nov 2010
Posts: 13
Hi Brenda,

The errors can be varied an example would be to run this command on a Cisco ASA firewall without being in configure mode:

FW01> aaa-server
^
ERROR: % Invalid input detected at '^' marker.
FW01>
FW01> enable
Password: ********************
FW01# aaa-server
ERROR: % Incomplete command
FW01#


This is just an example of a firewall, the concept could apply to many other device types (routes/unix/linux/etc).

It would be great to have the command output match a regex (preferred, and ideally allowing for spaces in the regex) or list of exact string expressions to match on. If it matches, then abort sending the remaining list of commands.

Does that make sense?

Let me know if you have any questions.

Thanks!
Nolan
Reply With Quote
  #6  
Old 08-20-2018, 04:00 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,997
Hi Nolan,

I have created a feature request on your behalf in our product enhancement database to provide a mechanism to bail from a multi-line (send to all) Command window (regular expression) and added this thread to it. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Request - Forum Thread #13220" in the subject line or use this form from the support page of our website.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #7  
Old 09-07-2018, 11:25 AM
nolan.rumble nolan.rumble is offline
Registered User
 
Join Date: Nov 2010
Posts: 13
Thank you Brenda! I appreciate it!

Nolan
Reply With Quote
Reply

Tags
command , multiple , sessions , single , window


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:37 AM.