I am doing an old-school command to get an inventory to many host using ssh thru Solaris machine. Please help me find a way thru script to get this automized. This will make me lazy but will surely benefit out of it. thanks in advance.
Process I am doing:
Host IPs (examples):
10.210.1.2
10.210.1.3
10.210.1.3
and maybe more
Command:
where:
above command will ask for password as below maybe after 2 or 3 seconds depending on connection speed:
SUPERUSER@10.210.1.2's password:
password will be like
"secure"
I will then do a command like:
rtrv-alm-all;
then log-out to the host with the command:
logoff;
then, will proceed with the second host.
I will then save each output of each host to a file (1 text file per host).
Can you please help me get the proper script to get my work automized and appreciate some comments to help me understand how the script is being done.
I am thanking you guys in advance.
Moderator's Comments:
edit by bakunin: sigh..., wrong forum, missing CODE-tags. I do hope you script better than you post.
You might consider using
to create a public/private key pair in the .ssh directory of the machine running the script then
the public key to the .ssh directory on the target machines. Using a key would simplify the script by eliminating the password.
>Old-school command
What is old is new again. Punchcards and paper tape; those are old-school!
I am trying to ssh the same host where I am logged in.It's asking for the password.
Please assist me with the troubleshooting steps for this.
Best regards,
Vishal (4 Replies)
Hi All,
Noticed few posts around this but coudnt get exatcly what i wanted. Thanks for your help again.
I have a script running on a remote machine and i normally ssh from putty and run the script manually.
Is there anyway that i can write an HTML Code with a button so taht when I Click... (1 Reply)
i want use ssh on the host01 to execute autoexec.sh on the host02 like following :
host01> ssh host02 autoexec.sh
autoexec.sh include nohup command like follwing :
nohup /home/jack/deletedata.sh &
after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
Hi all
I wrote a script to execute a script on several remote hosts, but somehow during the execution of the local script, ssh can't come back from the remote host, so that causes my local script hanging... I use the below command to do the job in the local script, any idea?
ssh... (12 Replies)
server is ok, I can login on console. however, when I use SSH teachia, there is no repsond.
i have check ps-ef | grep ssh, it shows ok. restart ssh too. still not working.
Anything else I need to check?
# ps -ef | grep ssh
root 24706 1 0 Jun 12 ? 0:00... (7 Replies)
i want a script with expect or perl or shell which will do ssh to remote host...it will take commandline argument and run the script in remote host.......
i.e that will be like ./ssh.exp remoteip username passwd /tmp.kk.sh
can someone help me on this? (1 Reply)
How can my unix shell script automatically connect to remote host?
Assume that there is a remote host called "rhost". When I connect to that host i give the command "telnet rhost".
It then asks me for my id and password. Once i give it connects there.
I want to automate these steps. I want... (8 Replies)
I'm looking for some sort of provider that I can connect to through a browser and subsequently open an ssh connection to another host. client based applet type solutions are blocked by firewall (2 Replies)
I will remote a connection to a Unix server and launch a command on this server. This commnand requires me to set a view in Clearcase to see the vob element. How do I set a view an run a command with ssh with the syntax: ssh host command? (3 Replies)