10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have googled this and found many solutions, but none of them are working for me. I am in a korn shell, most others reference bsh, maybe that is the issue? Anyway, all I am trying to do is use a variable I have declared in my main script in a remote shell I am running through ssh.
So I have a... (8 Replies)
Discussion started by: DJR
8 Replies
2. UNIX for Beginners Questions & Answers
Dear Experts,
I have found this script on internet that can be used to execute local script remotely
#!/bin/bash
# runremote.sh
# usage: runremote.sh localscript remoteuser remotehost arg1 arg2 ...
realscript=$1
user=$2
host=$3
shift 3
# escape the arguments
declare -a args
... (4 Replies)
Discussion started by: mukulverma2408
4 Replies
3. Shell Programming and Scripting
Hi, I'm trying to run a user defined shell script with options and arguments via ssh but getting error as ksh: Script.sh: not found.
Here is what i'm running:
ssh -t username@server 'cd /path/to/script; script.sh -t start
here '-t' with script.sh, is an user defined option and 'start' is also... (3 Replies)
Discussion started by: xsam
3 Replies
4. UNIX for Dummies Questions & Answers
I have the lines below on my script:
script.ksh:
case `hostname` in
some_host)
ssh server1A "/home/script.ksh $1 $2"
ssh server1B "/home/script.ksh $1 $2"
ssh server1C "/home/script.ksh $1 $2"
ssh server1D "/home/script.ksh $1 $2"
ssh... (1 Reply)
Discussion started by: erin00
1 Replies
5. UNIX for Dummies Questions & Answers
I am trying to run a command. This is one of my attempts:
for i in fileservera; do ssh -t $i 'sudo ls /';doneThis works, and I see the directories. However, what I want to do now is start a process on the remote server such as /usr/bin/connectproc -standalonesudo /usr/bin/connectproc... (1 Reply)
Discussion started by: newbie2010
1 Replies
6. Shell Programming and Scripting
Hi Experts,
I am new to Shell scripting. I want to login to a server using a script. The normal command I use is --> sudo ssh <Servername> . when i tried putting this into a txt format file and tried running, it throw an error "can't execute". I am an Admin and i have root access. Any help would... (6 Replies)
Discussion started by: Tom1989
6 Replies
7. Shell Programming and Scripting
When i use ssh command to execute local script on remote server , I am unable to do it.
Please let me know how this can be done in ksh
req=abc
dte=ghd
ssh username@hostname "$req $dte" < run_script.sh (2 Replies)
Discussion started by: lalitpct
2 Replies
8. OS X (Apple)
I was following a tutorial on installing Homebrew and I changed the ownership of /usr/local/ to me. Now McAfee Security won't start This is the exact line I typed:
sudo chown -R `whoami` /usr/local
Then I tried to fix it with:
sudo chown -R root /usr/local
I still can't start mcafee. It say... (7 Replies)
Discussion started by: chancho
7 Replies
9. Shell Programming and Scripting
I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this:
#!/bin/bash
rsync /path/on/local/machine/ foo.com:path/on/remote/machine/
ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies
10. Shell Programming and Scripting
Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies