scp password authentication help

Hi… Does anyone know how I can make this work?


set shellscript to "scp ~/Desktop/afile.test mydomain.com:www/files/"
set mypass to "mypassword"
do shell script shellscript password mypass

Thank you in advance!

i use dsa keys to do authentication

to make one
use

ssh-keygen -t dsa

hit enter a bunch of times

mv ~/.ssh/id_dsa ~/.ssh/identity

then move ~/.ssh/id_dsa.pub to the users home folder and store it under ~/.ssh/authorized_keys

and that should remove you need for a password

then you can just use the command

do shell script "scp ~/Desktop/afile.test mydomain.com:www/files/"

I have the exact same question.

Yes it works to use keys, but I want the script to be portable so I don’t have to setup keys to manage 50 workstations.

Does anybody know how to get the password request from scp within the “do shell script” command to open a dialog so the user can type it it, and the command complete? Obviously “with administrator privileges” doesn’t work since you need the password for the remote machine, not the local machine.

There must be a way to force stdout from the scp command to open a dialog window and allow you to type the requested password.