10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am trying to run an awk command inside of ssh and it is not working. These are AIX servers.
for i in `cat servers`; do ssh $i "/bin/hostname; df -g | awk '/dev/ && $4+0 > 70'"; done
server1
server2
server3
server4
I also tried these two methods and they did not work. It just seemed... (5 Replies)
Discussion started by: cokedude
5 Replies
2. Shell Programming and Scripting
Hi,
Below is my ssh command which runs fine when I run from server1
$ sshpass -p mypassword ssh -o ConnectTimeout=13 -t user1@server2 'echo "mypassword" | sudo -S -l; echo "$?#`hostname`"; exit'
but when I run the exact same command using another user ID the control... (4 Replies)
Discussion started by: mohtashims
4 Replies
3. Shell Programming and Scripting
Hi All,
I have the below requirement.
I want to copy the local file to remote after that i need to run the local script on a remote machine.When i use two ssh commnds i can achieve this. But i want to achieve this using one ssh command.
Below command to copy the local file to remote
ssh -q... (2 Replies)
Discussion started by: mohanalakshmi
2 Replies
4. Shell Programming and Scripting
( sleep 3
echo ${LOGIN}
sleep 2
echo ${PSWD}
sleep 2
while read line
do
echo "$line"
PID=$?
sleep 2
kill -9 $PID
done < temp
sleep 5
echo "exit" ) | telnet ${HOST}
while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies
5. Shell Programming and Scripting
Hello,
I am trying to create a ksh script to login to server and collect gather output of some command to troubleshoot some issue.
DATE=`date +%b.%d.%Y.%M.%H`
echo " Enter emp id to login to server"
read Eid
Eid=$Eid
echo " Enter hostname of the system"
read HOST
HOST=$HOST... (2 Replies)
Discussion started by: saurabh84g
2 Replies
6. Shell Programming and Scripting
Hi all,
Is it possible to make this possible ?
$ echo $SKY_HOME
/var/sink/SKY
$ echo $SKY_HOME
/home/smily/SKY
$ ssh root@xyz "echo $SKY_HOME"
root@xyz 's password: ******
/home/smily/SKY wrong output
I was expecting the output as
/var/sink/SKY (3 Replies)
Discussion started by: linuxadmin
3 Replies
7. UNIX for Dummies Questions & Answers
Hey,
For a couple of months, I was using SecureCRT which was satisfying all my needs (keyboard-interactive, sftp ...). Its licence got expired and I no longer want to pay for it.
Is there any SSH program other than Putty, u would suggest as free or less expensive with a user interface like... (3 Replies)
Discussion started by: royalliege
3 Replies
8. Shell Programming and Scripting
I need to run a set of commands on a remote machine using ssh. it should also collect output and return status of each command. Can someone help me how to do this? (1 Reply)
Discussion started by: vickylife
1 Replies
9. Shell Programming and Scripting
how to run a command in different machie
in my case script will runs in solaries machine..
in one instance it has to run a command in different machine with different operating system ( linux ) using SSH command
i tried
ssh -l (login_name) (machine name/host ) " command "
but it is... (3 Replies)
Discussion started by: mail2sant
3 Replies
10. Shell Programming and Scripting
How would I combine something like:
localserver# ssh remoteserver
remoteserver# find blah blah blah
into a one liner that would ssh to the remote server and run the find command, so I could put it in a script to automatically go out and run things on remote servers with out needed user... (2 Replies)
Discussion started by: LordJezo
2 Replies