Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Secure Shell

Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2019, 01:30 PM
akd akd is offline
Registered User
 
Join Date: Mar 2019
Posts: 3
SecureCRT Command Line Options - Non-interactive command on the server

After a non-interactive SSH log in to a remote server without any interactive prompting, can I execute a script on the remote server?

Using Plink (Putty), I can execute a remote script. For example, to execute a script backup.sh on a remote server(myhost.local), I can issue a command:

plink ubuntutest@myhost.local -i PuttyPrivate.ppk ./backup.sh

I am wondering if this is possible using SecureCRT SSH.
Reply With Quote
  #2  
Old 03-04-2019, 02:57 PM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
Hi akd,

SecureCRT can absolutely run commands on the remote system. Because Plink is a command line only utility and SecureCRT is a GUI application there will some variance in how this is done.

One option would be to use SecureCRT's Remote command functionality.
  1. Create and save a session to the remote server
  2. Right click on the saved session and choose Properties
  3. Select the Logon Actions category
  4. Enable the Remote command option
  5. Enter the command you would like to run on the remote system
  6. Save your changes



When connecting to this session, SecureCRT will automatically run the remote command. After the remote command completes SecureCRT will automatically disconnect the session. Based on your needs, there are additional configuration options available to automatically close the tab/application upon disconnect as well.

Does this help get you the behavior you're looking for?
Attached Images
File Type: png RemoteCommand.png (30.3 KB, 67 views)
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply

Tags
securecrt 8.5.3


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 08:42 PM.