Re: how to log onto unix machine and run some job in background and then logout automatically in a script for 30+ such unix machines?

From: Eddie (eps102_at_xs4all.nl)
Date: 09/27/03


Date: Sat, 27 Sep 2003 12:47:09 +0200

Try using keys indeed (you won't have to enter passwords; be sure to use
keys without passphrases).....and then:

ssh user@machine "nohup command &"

I guess now the machine is running your ssh command in background....

Regards,
Eddie

"walala" <mizhael@yahoo.com> wrote in message
news:bl2fmj$3is$1@mozo.cc.purdue.edu...
> Dear all,
>
> I am facing a problem that needs your help... I need to run a simulation
in
> part on about 30+ unix workstations, servers, etc. We use ssh here.
>
> Every time I need to do the following:
>
> ssh username@machinename1.xxx.xxx.xxx
> nohub run_some_job_in_background &
> logout
> ssh username@machinename2.xxx.xxx.xxx
> nohub run_some_job_in_background &
> logout
> ssh username@machinename3.xxx.xxx.xxx
> nohub run_some_job_in_background &
> logout
>
> the trouble was:
>
> a. The above script scheme did not work. after I typed in the password for
> the first login, it logged onto the first machine, and run .cshrc of that
> machine, and then stopped, without running my "nohub" and "logout"
command,
> basically, it stopped there;
>
> b. Even if the scheme worked, there still has the trouble that everytime I
> need to type in password again and again for the 30+ machines...
>
> Can anybody give me help on how to fully streamline the whole process?
>
> Thanks a lot,
>
> -walala
>
>



Relevant Pages

  • Re: Any Way to Defeat Cracker Login Attempts? (OS X)
    ... Ssh keys are more secure than passwords. ... By ssh keys I assume you mean PKA keys, unless I am misreading you yet ...
    (comp.sys.mac.system)
  • Re: Confusion on SSH and PAM
    ... Looks like I've understood the interaction between SSH and PAM wrong ... According to my understanding of the SSH protocol, ... the SSHD will permit root logins if a command to be executed is given. ... I have keys setup for root ...
    (freebsd-questions)
  • [SOLVED] Re: Unable to Automate SSH authentication
    ... I am configuring Fedora Core 6 and CentOS5.3 for automatic SSH ... hosts and copied id_dsa.pub keys to it. ... I think it is unable to read the key, I copy/pasted these keys from command promt, what is wrong here. ...
    (Fedora)
  • Re: Really need help on this one
    ... Is there a way to read the output of a particular command into ... Heres a better example using ssh. ... set timeout $timeout ... exec kill -9 $pid ...
    (comp.lang.tcl)
  • Re: how to enable rsh on solaris 10
    ... I m trying to execute some command on my Solaris 10 box from Windows ... rsh -l username comamnd ... You can use ssh in place of rsh for remote host command execution, ... you need to generate keys and set them up to be "authorized keys" on the target host. ...
    (comp.unix.solaris)