September 2017
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

September 2017
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

expect,sshpass,pash

expect,sshpass,pash rpm -qa expect

yum install expect -y

useradd mohan

echo 123456|passwd –stdin mohan

su – mohan

ssh-keygen -t dsa -P ” -f ~/.ssh/id_dsa >/dev/null 2>&1

yum install lrzsz -y

cat mohan_sshkey.exp #!/usr/bin/expect if { $argc !=2 } { send_user “usage: expect mohan_sshkey.exp file host\n” exit } #define var set file [lindex $argv 0] set […]