[olug] Help ssh

David Walker linux_user at grax.com
Wed Oct 16 12:41:40 UTC 2002


On client machine:
ssh-keygen -d

just hit enter when prompted for a passphrase if you want this to run without 
user intervention

scp ~/.ssh/id_dsa.pub server_machine:/home/(username)/.ssh/my_key.pub
ssh server_machine
	cd ~/.ssh/
      if authorized_keys2 does not exist
	mv my_key.pub authorized_keys2
      if it does exist
	cat my_key.pub authorized_keys2 > authorized_keys2.new
	mv authorized_keys2.new authorized_keys2

	check that authorized_keys2 is owned by you and make the permissions rw (600)

now "ssh server_machine" should connect with no password and in a secure 
manner

ssh server_machine "cd /some/other/directory; some_command"
should work now

On Wednesday 16 October 2002 05:29 am, (Via wrote:
> 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
>
> __________________________________________________
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug




More information about the OLUG mailing list