[olug] Help ssh

BuzB buzb at cox.net
Wed Oct 16 11:19:02 UTC 2002


On Wednesday 16 October 2002 05:29 am, ERIC MAHLAKO enlightened us with:
> Hi
> I want to run executable file from the remote host
> automatically after ssh command.
> e.g
> in a batch script I want to do the following
>    - ssh remote host
>    - change directory
>    - run the executable file in the directory chosen
> from above.
>
> Can anyone help
> Thanks
> Eric

Eric,

Since you're asking in OLUG, one of these machines is Linux?  :-)
Are you attempting to do this from Linux-->Linux; or  Linux-->some other OS; 
or some other OS-->Linux?

Explain a little more what you want to do.  Are both machines on the same 
network or are you planning on crossing the public domain (bad idea with no 
password)?  

There are other options if both machines are on the same LAN/WAN:  SAMBA or 
any network file system (NFS) would allow you to connect and treat that 
directory as part of your file system.

If you're hellbent on using SSH, what distro (SSH, OpenSSH, etc)?  A quick 
search on google provided these links

http://www.onsight.com/faq/ssh/ssh-faq-4.html#ss4.6

Specifically look at section 4

http://www.csua.berkeley.edu/ssh-howto.html
 of interest on this site is:

  "You can generate a public key (sort of like a Kerberos ticket) that will
  let you login to UNIX accounts that without typing your SSH
  password each time.   When you first login to your local workstation,
  run "ssh-agent" and give it your passphrase.  Then ssh will not
  prompt for the password; the target account must have your
  "identity.pub" key in ~/.ssh/authorized_keys."

HTH
-- 
BuzB

Registered Linux User #216668
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Current System Stats:
Linux 2.4.18-6mdk #1 Fri Mar 15 02:59:08 CET 2002 i686
  6:17am  up 2 days, 12:31,  1 user,  load average: 1.27, 1.22, 1.11
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Seti work units completed: 3706
Seti client running: 2-09:35:43
Percentage complete: 49.7726
Last result returned: (Wed Oct 16 03:02:45 2002)





More information about the OLUG mailing list