10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
local script:
cat > first.sh
cd /tmp
echo $PWD
echo `whoami`
cd /tmp/123
tar -cvf 789.tar 456
sleep 10
except script:
cat > first
#!/usr/bin/expect
set ip 10.5.15.20
set user "xyz123"
set password "123456"
set script first.sh
spawn sh -c "ssh $user@$ip bash < $script" (1 Reply)
Discussion started by: Aditya Avanth
1 Replies
2. Shell Programming and Scripting
I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code
TARFILE=${NAME}.tar
TARGZFILE=${NAME}.tar.gz
ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies
3. Ubuntu
Hello,
What I want to do is to run a file on remote server by running a script at localhost but script should not ask ssh password of my remote server when script is executed.
Scenario1:
To copy files from server2 to data server:$ scp -r root@server2_ip:/var/www/html/*.* /var/
When I enter... (6 Replies)
Discussion started by: baris35
6 Replies
4. Shell Programming and Scripting
Hi all,
i need to run a shell script on remote server. I have created file .bat file in windows server with following code,
c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh
i need to run the script.sh in my remote server
Above command is not working, any... (4 Replies)
Discussion started by: rammm
4 Replies
5. Shell Programming and Scripting
hi,
I need script to perform below task.
1. Read the IP address
2. copy the script from origin server to destination.
3. get root access on destination server
4. run the script on destination server
5. return to the origin server
Code:
#!/bin/bash
echo "Enter Server IP... (5 Replies)
Discussion started by: bapu1981
5 Replies
6. Shell Programming and Scripting
Hi All,
I need script to perform below task.
1. I have a script in one server and need to copy this script to remote server
2. login in to remote server
3. run the script which i copied to this server.
#!/bin/bash
read a
scp /tmp/script.sh user@hostname:/tmp
ssh user@$a
./scirpt.sh
... (2 Replies)
Discussion started by: bapu1981
2 Replies
7. HP-UX
Hi,
I have an application running on HP-UX, from this application I need to findout if the port number. lets say 7890,7891, 7892 are listening on the remote server running on HP-UX.
Is there any way of doing it using "system()" function or any other?
I noticed that nmap, netcat are not... (0 Replies)
Discussion started by: einsteinBrain
0 Replies
8. Shell Programming and Scripting
Hi I am working in a java application. I need to execute a perl script(linux) which is in remote machine in java application from local machine(windows). I need to do this process automatically that is without manual intereption. Now I will explain the process clearly, at present to run the... (1 Reply)
Discussion started by: bassma
1 Replies
9. Shell Programming and Scripting
hi,
I am using the below line to run a script from remote server(say server A) to another server(say server B).
ssh username@servername ksh script name.
The issue is the script logs into server B, executes the script on server B, transfers the file to server A but does not exit from... (4 Replies)
Discussion started by: yohasini
4 Replies
10. 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