10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Greetings, i've been working with a user-friendly menu on ksh to allow users execute scripts located on a remote server, so they wont have to login and manually launch those scripts every single time.
This is a HP-UX box and currently on a /usr/bin/ksh shell.
I've setup ssh keys on both... (1 Reply)
Discussion started by: nbriozzo
1 Replies
3. Shell Programming and Scripting
Hi,
I am trying to execute an ssh command in my script.
ssh abcd@server_name
After this command it actually logs in to the server asking for password prompt and then actually logs in to the server.
I want all this to be happening in the background and show noithing in the output of my... (8 Replies)
Discussion started by: vital_parsley
8 Replies
4. Shell Programming and Scripting
I try to ssh uses bash script in here-document like this.
ssh root@$SERVER <<EOF
if ; then
service httpd start
fi
exit
EOF
But got an error below.
maybe the if command causes the problem. Thanks for help. (2 Replies)
Discussion started by: muffle
2 Replies
5. Programming
I'm trying to write a foreground (password prompt) ssh command, passing in a here doc - any idea where I'm going wrong?
ssh <user>@<targetserver> /usr/seos/bin/sesu - <targuser> -c /usr/bin/ksh "param1" << EOF
date
echo ${1}
EOF
Tells me "Invalid option param1". However a simple date... (8 Replies)
Discussion started by: doonan_79
8 Replies
6. Programming
Hello,
I am trying to find a way to send several sequential commands via SSH to a remote box in a single command.
Thoughts so far:
1) Can I put them into a function and call the function within the ssh command?
e.g.
ssh <targetserver> $(functionx)
No - then it calls the function in... (4 Replies)
Discussion started by: doonan_79
4 Replies
7. Shell Programming and Scripting
Hello. I was wondering if someone can help me out with something. To simplify my life, I have written a tiny script to open an ssh tunnel through another linux host so that I can access the esxi hosts on that network using the client. For this I have to tunnel ports 443, 902, and 903. Here is what... (1 Reply)
Discussion started by: numetheus
1 Replies
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
Can we use a here document inside a here document?
Something like this
ssh user@remotehost << REMOTE
sudo vserver vsernamename enter << VSERVER
perform actions on vserver.
VSERVER
REMOTE (6 Replies)
Discussion started by: mnanavati
6 Replies
10. Shell Programming and Scripting
Hi :)
how can I use here doc to use ssh?
I am facing a problem with the below script:
#!/bin/bash
ssh hosein@localhost << *
123456
*
"123456" is my password
Thanks (2 Replies)
Discussion started by: htabesh
2 Replies