in reply to Re: creating and writing a file on server
in thread creating and writing a file on server

sorry for the brief question. i tried Aristotle (first reply) solution and i got it to work. the OS is am working is freeBSD.

ssh remotehost cat >> filename <localfile

later i append stuff into filename at various times. now the problem is permission as every attempt to write to this file requires a password. and the script needs to be automated.
  • Comment on Re: Re: creating and writing a file on server

Replies are listed 'Best First'.
Re: Re: Re: creating and writing a file on server
by fglock (Vicar) on Oct 31, 2002 at 21:00 UTC

    See: man ssh
    You will find (mostly) everything about ssh authentication.

Re: Re: Re: creating and writing a file on server
by BrowserUk (Patriarch) on Oct 31, 2002 at 21:06 UTC

    Aristotle++ His internet prescience device must be performing optimally tonight.


    Nah! Your thinking of Simon Templar, originally played by Roger Moore and later by Ian Ogilvy
Re^3: creating and writing a file on server
by Aristotle (Chancellor) on Oct 31, 2002 at 23:08 UTC
    You will want to generate a key pair for this purpose. You copy the public key to the remote machine, and use ssh-agent on the local machine to keep the private key authenticated. (Otherwise you will need to enter the key's passphrase to connect.) As fglock said, man ssh will provide you with plenty of information - Googling for ssh tutorial will also reveal a wealth of quickstart help.

    Makeshifts last the longest.

      thanks for your valuable feedback. i am in better shape now. regards.