Execute arg with ssh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute arg with ssh
# 1  
Old 02-29-2016
Execute arg with ssh

Hello,

I am trying to execute remote script with ssh :

Code:
ssh -o ConnectTimeout=10 -o PasswordAuthentication=no -o NumberOfPasswordPrompts=0 -o StrictHostKeyChecking=no root@host '/arbo/script -t'

My script is well executed, but my option '-t' is never loaded, how can you explain that ?
# 2  
Old 02-29-2016
How do you retrieve that option? How do you tell it "is never loaded"?
# 3  
Old 03-01-2016
Cause this script answer something else with "t" option (tested on local), but now it s working, i don't know why, i thought that i had to escape some quotes or something else, maybe i didn't write correctly all my option, nevermid, thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute a command after ssh exits

In my .tcshrc I define and run an alias to set my terminal title. The title contains the hostname. I do this because I ssh to other machines a lot and I always need to know which host I am typing in. The alias is defined and run in the .tcshrc like this... alias tt 'echo -n "^0;`hostname -s`^G"'... (5 Replies)
Discussion started by: salvadorjoshua
5 Replies

2. Shell Programming and Scripting

Execute command on remote host via ssh

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

3. Shell Programming and Scripting

Execute command using ssh server 'cmd'

Hi The command below does not work as it require to take command in the breakers But If I do so the variable values get lost ssh testserver01 'dsmc q b "${ARCHIVE_DIR}*" -sub=yes -querysummary -inactive -fromd="${BACKUP_DATE}"' Thank you. (3 Replies)
Discussion started by: zam
3 Replies

4. Shell Programming and Scripting

execute ssh command via perl

Hi I have a perl command that doesn't seem to be working correctly. It appears to be fine but even when i try and run it manually same thing. Can someone take a look at this and tell me what they think the problem could be? Here is the perl Line: system ("echo 'ssh -t -t $user\@$_ \"cd... (3 Replies)
Discussion started by: vpundit
3 Replies

5. Shell Programming and Scripting

ssh execute command remotely

Hi all, Today I want to write a script to run the commands remotely. If I run the command as follows: ssh <user>@<ip> 'ls; pwd' it works fine. But when I want to use ssh to set view in clearcase, it will lose the response. as follows ssh <user>@<ip> 'cleartool setview <view_name>; pwd'... (1 Reply)
Discussion started by: Damon_Qu
1 Replies

6. Shell Programming and Scripting

Using ssh to execute a remote script in the background

Help please!! I want to use ssh to execute a remote exe and while it's running I want to query for the process ID of the exe (2 different ssh commands) 1. sshpass -p "<passwd>" ssh -f -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@<ipaddress> nohup /tmp/mmds_asyn & 2.... (0 Replies)
Discussion started by: rvompoluTMW
0 Replies

7. Shell Programming and Scripting

SSH execute remote command (with jump)

Hi all, I am facing the following issue: Host A should execute a remote command (say pwd) on host B2. B2 is not directly reacheable but you have to connect from a to B1, then from B1 you can execute the command ssh user@B2 pwd. B1 and B2 are directly connected: A => B1 => B2 | ... (3 Replies)
Discussion started by: Evan
3 Replies

8. Shell Programming and Scripting

ssh - to execute set of commands

Hi Can someone help me to figure out Want to execute few cmds in remote host thru ssh Tried below cmd -------------------------------excerpt------------------- RDIR=/data1/logs ---> variable stores rem. server directory TODAY="`date '+%b %d'`" ssh -i $userid@$host "cd... (2 Replies)
Discussion started by: id100
2 Replies

9. Programming

warning: int format,pid_t arg (arg 2)

I try following code under Solaris10,like follows: int glob = 6; int main(void) { int var; pid_t pid; var = 88; printf("before vfork\n"); if ((pid = vfork()) < 0) { err_sys("vfork error"); } else if (pid == 0) { glob++; var++; _exit(0); } ... (1 Reply)
Discussion started by: konvalo
1 Replies

10. Shell Programming and Scripting

ssh to remote host and execute command

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
Login or Register to Ask a Question