10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies
3. Shell Programming and Scripting
How should i make the following code working
#!/bin/bash
INPUTFILE="test.txt"
while read STRING; do
IP=`host -t A $STRING | awk '{print $NF}'`
HOSTNAME=`ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no $IP "hostname"`
echo $HOSTNAME > out.txt
done < $INPUTFILE
At this moment while... (3 Replies)
Discussion started by: urello
3 Replies
4. Shell Programming and Scripting
Hi,
i want to write script where it will login into 50 hosts and if login is successful it print message "login to host1 is
successful" if not it should print message "Not able to login to host1". once connection to the host is succesful it should fire df command to check filesystem if df is... (3 Replies)
Discussion started by: amru8810
3 Replies
5. Shell Programming and Scripting
I am automating the SFTP keys setp process:
So i created the expect script for controlling the output of shell
below is my main code:
#!/usr/bin/expect
set fd
set password
close $fd
set df
set app
close $df
spawn ssh servername << pb
Pb file:
set df
set app
close $df (4 Replies)
Discussion started by: Manoj Bajpai
4 Replies
6. UNIX for Advanced & Expert Users
Not able to execute the file in remote host using except utility
I am automating the SFTP keys setp process:
So i created the expect script for controlling the output of shell
below is my main code:
Code:
#!/usr/bin/expect
set fd
set password
close $fd
set df
set app
close $df... (1 Reply)
Discussion started by: Manoj Bajpai
1 Replies
7. Shell Programming and Scripting
I am newbie in Unix and Expect script, so please help me :(
I'm using expect script for remote another host:
#!/usr/bin/expect -f
set timeout 10
spawn ssh -l root 10.120.18.4
expect "password:"
send "password\r"
expect "@"
interact
And now how can i use expect script for access mysql... (2 Replies)
Discussion started by: wormym
2 Replies
8. Programming
Hi All,
I am using a expect script to run a shell script on remote server, the code is as follows. But the problem is that it executes only first command, and hangs it doesn't run the next commands.
spawn ssh $uid@$host
expect "password:"
send "$password\r"
expect "*\r"
send... (2 Replies)
Discussion started by: yashwanthsn
2 Replies
9. Shell Programming and Scripting
Hi, could anyone please tell me how to ssh to remote host foo and execute command on it and print the result on local host?
Thanks,
Paresh (1 Reply)
Discussion started by: masaniparesh
1 Replies
10. Shell Programming and Scripting
I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies