When debugging these sort of scripts you should have a much shorter timeout. You don't want to wait for 60 seconds for expect to tell you it missed something:
Once it's working OK then bump you timeout up to a reasonable value, I still think 60 seconds it too long for a login prompt or for those simple commands to complete.
Hi,
Does anybody know how to change the password on multiple servers with a script. I have 300 Sun boxes and the password expiry is set to 30 days. Im in a process to build a script using expect. Need a help from an expert who has already done it.
Regards,
Vinod (1 Reply)
Could someone please help me...I have an expect script. There's a need for a log in during the script and a password is required...right now the password is just a variable in the expect script...what would be the best way to put that in an encrypted flat file and have the expect script pull the... (2 Replies)
Hello folks
I have a conf file ,say 'pass.conf' ,which is storing ascii password : PASS1111.
I need to encrypt this password once and store it in a file.
I ,then need to write a script which would read this encrypted password and decrypts it.The o/p o this script shud be this decrypted... (8 Replies)
All,
I am trying to use expect to send SFTP password because I am unable to share a key with the vendor.
They gave me a password that uses some symbols in it like $ and !
When i try to use the send command in expect it thinks the $ is a variable.
Is there anyway to have it send the... (2 Replies)
Hi
I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue:
I want expect script for random passwords and random commands generation.
please can anyone help me?
Many Thanks in advance (0 Replies)
How can I pass password in SSH command without using expect in a shell program.
I don't have expect installed on my Solaris server.
#!/bin/bash
ssh user@hotname (how to supply pass in script?:wall:)
Experts please help its very urgent.
Shrawan Kumar Sahu (4 Replies)
Hi
I'm trying to run a script " abc.sh" which triggers "use.sh" .
abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script.
Please find below the scripts:
#abc.sh
#!/usr/bin/expect -f
exec /root/use.sh
expect "*name*"
send... (1 Reply)
Hello All,
I hope someone could help me with this.
I'm creating a shell script to run a process. The trouble is, part of the process has to be ran as a different user. I can 'su' to the user ok, but I'm having trouble passing a 'cd' command as well as some variables I set earlier in the... (1 Reply)
Dear All,
I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
I need to copy python script file to around 100 servers using expect script.
1. Copy script to my user home first(/home/myhome) on each remote server
2. change permissions on copied file to 766.
3. sudo to appuser1 account on remote server. copy script file from my user home to /usr/bin/... (1 Reply)
Discussion started by: kchinnam
1 Replies
LEARN ABOUT DEBIAN
ssl_ctx_get_timeout
SSL_CTX_set_timeout(3SSL) OpenSSL SSL_CTX_set_timeout(3SSL)NAME
SSL_CTX_set_timeout, SSL_CTX_get_timeout - manipulate timeout values for session caching
SYNOPSIS
#include <openssl/ssl.h>
long SSL_CTX_set_timeout(SSL_CTX *ctx, long t);
long SSL_CTX_get_timeout(SSL_CTX *ctx);
DESCRIPTION
SSL_CTX_set_timeout() sets the timeout for newly created sessions for ctx to t. The timeout value t must be given in seconds.
SSL_CTX_get_timeout() returns the currently set timeout value for ctx.
NOTES
Whenever a new session is created, it is assigned a maximum lifetime. This lifetime is specified by storing the creation time of the
session and the timeout value valid at this time. If the actual time is later than creation time plus timeout, the session is not reused.
Due to this realization, all sessions behave according to the timeout value valid at the time of the session negotiation. Changes of the
timeout value do not affect already established sessions.
The expiration time of a single session can be modified using the SSL_SESSION_get_time(3) family of functions.
Expired sessions are removed from the internal session cache, whenever SSL_CTX_flush_sessions(3) is called, either directly by the
application or automatically (see SSL_CTX_set_session_cache_mode(3))
The default value for session timeout is decided on a per protocol basis, see SSL_get_default_timeout(3). All currently supported
protocols have the same default timeout value of 300 seconds.
RETURN VALUES
SSL_CTX_set_timeout() returns the previously set timeout value.
SSL_CTX_get_timeout() returns the currently set timeout value.
SEE ALSO ssl(3), SSL_CTX_set_session_cache_mode(3), SSL_SESSION_get_time(3), SSL_CTX_flush_sessions(3), SSL_get_default_timeout(3)1.0.1e 2013-02-11 SSL_CTX_set_timeout(3SSL)