I know the root login/password for a machines, and I want to automate some commands like this from each:
ssh root@remoteHost1 "tail /var/log/messages"
ssh root@remoteHost2 "tail /var/log/messages"
ssh root@remoteHost3 "tail /var/log/messages"
ssh root@remoteHost4 "tail /var/log/messages"
ssh... (2 Replies)
Hello - I've used 'expect' in FTP scripts before without any problems, but am unsure as to how I would script a tar over ssh session?
I need to send password for authentication to the remote Suse machine.
:confused:
Any assistance provided would be GREATLY appreciated. (6 Replies)
I am trying to put an awk command in ssh, for example:
ERRCOUNT=`ssh -n $HOST "ps -ef | grep .job | grep -v grep | grep -v alert_jobs_still_running |wc -l"`
From korn shell prompt this works:
awk '/^Jul 12 16/ {print $0}' /u01/app/oracle/jobs/adhoc/test.dat | wc -l
My data file:... (3 Replies)
I'm having a problem here and I was wondering if anyone could help me? I'm putting together a password script. First off, I don't have root access. I have sudo access. Lets say the User ID is Trevor1, the password is H!rry23! and the server name is Linux1234
This is how the script begins
... (5 Replies)
I am new here so I apologize if this question is in the wrong section or outside of the realm of this board. Also, this is just my first week into shell programming so I am probably doing lots of things wrong.
I am trying to write a script to ssh to a machine as one user and then run a command... (0 Replies)
Hi,
I am running a script that connets to a list of servers with SSH and runs a command but I have some servers that are asking for password (authorized keys is not configured properly).
Is there any way to do so that if I get a prompt for password just skip that entry?
my script:
... (1 Reply)
Hi @ all
I have the following scenario:
As Admin of a cupple of servers I tried to write the following script to figure out, if the machine is up and available and if some directory´s were available. But my script is having some probs, while running. Maybe some of you have a better way to... (9 Replies)
Hi There,
I have a file contaning some 100 servers names one by one the file called redhat_servers.txt
I want to prepare a script where it should give me the host name and kernal version.
I wrote like this,
#!/bin/bash
while read line
do
ssh $line "uname -nr"
done <... (3 Replies)
HI
I have the following requirement
I have a script a.sh which will deploy files in multiple servers .The argument for the a.sh is abc.gz host1.conf
where abc.gz is a zip file and one.conf will contain all the database connection string .
Now I have to write a b.sh which will... (7 Replies)
Hello,
I currently have very little experience with Shell scripting and trying to create a script for the purpose of collecting the size of a couple sizes on 4 different Hosts. The Idea is to collected the information from the files in which the script is kicked off on, store the values into... (17 Replies)
Discussion started by: Abstract3000
17 Replies
LEARN ABOUT PHP
ssh-argv0
SSH-ARGV0(1) BSD General Commands Manual SSH-ARGV0(1)NAME
ssh-argv0 -- replaces the old ssh command-name as hostname handling
SYNOPSIS
hostname | user@hostname [-l login_name] [command]
hostname | user@hostname [-afgknqstvxACNTX1246] [-b bind_address] [-c cipher_spec] [-e escape_char] [-i identity_file] [-l login_name]
[-m mac_spec] [-o option] [-p port] [-F configfile] [-L port:host:hostport] [-R port:host:hostport] [-D port] [command]
DESCRIPTION
ssh-argv0 replaces the old ssh command-name as hostname handling. If you link to this script with a hostname then executing the link is
equivalent to having executed ssh with that hostname as an argument. All other arguments are passed to ssh and will be processed normally.
OPTIONS
See ssh(1).
FILES
See ssh(1).
AUTHORS
OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0. Jonathan Amery wrote this ssh-argv0 script and the associated documentation.
SEE ALSO ssh(1)Debian Project September 7, 2001 Debian Project