#1
|
|||
|
|||
Running command after login
I know this has been covered in several articles but for some reason it just doesn't work for me. I'm evaluating SecureCRT for possible use.
I want to connect to a Linux server (Centos 7) and run a command such as cd or ls after login. The remote command option runs a command and exits which is not what I want so I'm trying to use the login actions with Automate logon. I want to avoid having to write a script - not that I don't like scripting but given that the system has the command I need I want to use them. Under expect I enter this (there is a space after the #. ]# Under send I enter this for testing purposes. ls I connect and get this. If I execute ls from the command line after login I get a list of files in my home directory. Last login: Sat Sep 29 12:46:36 2018 from 10.0.110.245 [userserver ~]# [userserver ~]# [userserver ~]# So what am I doing wrong? From what I have read the command ls should execute after login once SecureCRT sees the expect string. So far I am impressed with SecureCRT. I'm using something similiar but it's only for Linux and SecureCRT works on Windows and Linux so I can have one app. I also like the execute commands on multiple targets which the other app does but not as nicely. Thanks. |
#2
|
|||
|
|||
Hi MalcomR,
I'm sorry to hear you're having trouble. It sounds like you have the right idea about logon actions. As a quick test, does removing the trailing space from your expect string change the behavior you see? If not, there is some additional information that would give me a better idea of what may be happening. First would be a screenshot of your Logon Actions category and the second is a log of a connection. PLEASE DO NOT POST THESE DIRECTLY TO THE FORUMS, instead please send these via email to Support@VanDyke.com with "ATTN Eric Forum Post 13268" in the subject line. To create the log file choose File > Log Session before connecting to your server. You will need to select a file name/location. I suggest something ease to find such as SecureCRTLog.txt on your Desktop. Once you've configured the log file, attempt your connection again. When the Logon Actions fail please attach the resulting log for review.
__________________
Thanks, --Eric VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Running command after login
Quote:
|
#4
|
||||
|
||||
Exact same problem
What was the solutions for this post?
Thanks |
#5
|
|||
|
|||
Hi dagnabber,
It's been our experience that it is rare for it to be the exact same problem another user experienced. ![]() Please describe what you are trying to accomplish. What steps did you take to configure Logon Actions? What are the results?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|