Running a bash script

mark.stewart at mark.stewart at
Wed May 22 13:00:28 BST 2002

Cheers for the Help - I use putty every day, but not use the plink feature=2E

Got it all working now - just have to write the documentation :(



-----Original Message-----
From: dom at happygiraffe=2Enet at INTERNET
Sent: 22 May 2002 12:50
To: roger at runcircle=2Eco=2Euk at Internet
Cc: Mark Stewart; freebsd-users at uk=2Efreebsd=2Eorg at Internet
Subject: RE: Running a bash script

On Wed, May 22, 2002 at 11:53:48AM +0100, Roger McCalman wrote:
> On Wed, May 22, 2002 at 11:48:30AM +0100, Mark Stewart wrote:
> > Hi all,
> > > > What I want to do:
> > > > Run a shell script on my windows pc to connect passwordless via ssh2
to a FreeBSD 4=2Ex PC (I can already do) run a shell script then the bash shell
window to close=2E
> > > > By using ~/=2Essh/authorised_keys[2] and ssh-keygen you can create
public/private keys
> to allow passwordless login=2E

Usefully, putty[1] allows you to use keys on windows easily=2E  It also
comes with plink, a tool that runs from the command line=2E  As well, it
has pageant, an ssh-agent like tool, so you don't have to be prompted
for the keyphrase each time=2E  It's really very nifty indeed=2E

Alternatively, you could use a key without a pass phrase, but which is
only able to run the specific script you want=2E  This is a useful and
under-used feature of ssh=2E  Search for "command=3D" in the sshd man page=2E

> > I was wondering how I would do this on the FreeBSD - can I pass ssh a
path of a shell script to run=2E
> > ssh freebsd-host 'shell command line'
> > the sheel command line would probably want to use nohup and have a & to
> the process so that the ssh can complete=2E
> > I have never used ssh on windows but it works well from unix to unix=2E

If you don't use the nohup/& the ssh will wait for the command to
finish, then close the window=2E  This may be acceptable for you=2E


[1] http://www=2Echiark=2Egreenend=2Eorg=2Euk/~sgtatham/putty/

------ FreeBSD UK Users' Group  -  Mailing List ------

This communication is confidential and intended for
the exclusive use of the addressee only=2E You should
not disclose its contents to any other person=2E
If you are not the intended recipient please notify
the sender named above immediately=2E

BACS Limited, registered in England, No 1023742,
3 De Havilland Road, Edgware, Middlesex, HA8 5QA

More information about the Ukfreebsd mailing list