"be consistent" | |
PerlMonks |
SSH leaving terminal confused issueby wulvrine (Friar) |
on Apr 24, 2007 at 13:58 UTC ( [id://611740]=perlquestion: print w/replies, xml ) | Need Help?? |
wulvrine has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow monks, I have a couple of questions in the following code. Basically the code tries to figure out if the user is authorized for SSH without password. So, it forks off a simple command and waits 2 seconds. If it responds within 2 seconds the user is authorized. Otherwise it prints that the user is no longer authorized. The problem I am having here is after completion of an unauthorized user (where the password prompt is displayed), the terminal no longer works right (pressing enter just redisplays prompt on same line, typing doesnt show up in window etc.) until a 'reset' command is given. What am I missing to either cause the terminal to exit properly, or to reset it (without losing information on the screen) when finished? A second, less vital question, is how do I keep any text being displayed from the SSH'd term. I have tried saving off STDOUT/STDERR, rdirecting them, and putting them back at the end. This doesn't keep the password prompt from appearing, and doesn't help with messing up the terminal, as I was hoping for 2 birds with one stone.
Note::Why am I not using Net::SSH::Perl? Because Net::SSH::Perl Doesn't seem to work properly on many of my test systems (For example, it stalls for minutes per command on my Fedora Core 6 based machines. This is unusable for something done every 5 seconds.) Creating authorized_keys would allow my test programs to SSH without password, which allows them to perform SSH commands without using faulty Net::SSH::Perl module Thanks!
s&&VALKYRIE &&& print $_^q|!4 =+;' *|
Back to
Seekers of Perl Wisdom
|
|