#1
|
|||
|
|||
![]()
Dear All,
I encountered a problem on running SecureCRT python script by Linux command line. Here is the command that I use to run the script. # SecureCRT /script test.py It can succeed to open the SecureCRT window and open the session in tab. But it stop on login prompt. It seems the crt.Screen.WaitForString() can't capture the string and then the crt.Screen.Send() can't send the response sting. Is there other methods I can use? Thanks. |
#2
|
|||
|
|||
Hello thewhite,
I am not sure if you intended to, but you did not attach your script. What version of SecureCRT are you using? What protocol are you using in your connection? How are you making the connection in the script (ie: is it a saved session or an ad hoc connection)? If I had to make a guess at the cause of the issue (if SSH2 protocol), I would say you probably have not enabled the Display logon prompts in terminal window option in the Connection / Logon Actions category of SecureCRT's Session Options. If connecting to existing saved sessions and you need to make that change to many (or all) sessions, see these tips on our website: http://www.vandyke.com/support/tips/defaultset.html http://www.vandyke.com/support/tips/multisessions.html If an ad hoc connection, you would use the Default Session tip, but could change Default Session only (instead of all sessions).
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Dear Brenda,
Many thanks for your reply. The problem is fixed. But I totally have no idea how it is fixed. And I encountered another problem when I run the script by crontab. It shows the error message "SecureCRT: cannot connect to X server". Do you have any idea about this error message? Thanks. - Aries |
#4
|
|||
|
|||
Hello aries,
There is not enough information to know at this point. What is the command-line you use in crontab to run SecureCRT and connect? Are you able to connect the session successfully outside of crontab? I am puzzled by the "X server" reference you noted in the error message. Are you attempting to forward X11 packets in the SecureCRT session? The best way to troubleshoot this would be to get trace options output. If you are running SecureCRT from the command-line, this has to be done by editing the session (or Default Session) INI file. Please contact support@vandyke.com and reference "Attn Brenda - Forum Thread #11850" in the subject line.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Tags |
command line , python |
Thread Tools | |
Display Modes | Rate This Thread |
|
|