ssh login and password in one line

atomlov

Registered
I'm very new to Terminal scripting. I'm actually just attempting to make an Automator Workflow that will upload some photos for a Flash based gallery.

The problem is I need to be able to change the chmod of the folder I upload. Is there a why to put the password in the connection script "ssh -1 username@site.com"?

Also, how do you write an AppleScript that will execute a shell script in an already open window, rather than attempting to open a new one?

I'd really appreciate any help! Thanks, Adam
 
atomlov said:
The problem is I need to be able to change the chmod of the folder I upload. Is there a why to put the password in the connection script "ssh -1 username@site.com"?

for the chmod part of ur question...go the folder that u wanna change using ur terminal, then type "chmod 755 "name of the folder u wanna change"" no...there is no way to put ur password into the shell script bcuz....its a security feature of unix based OSs' terminals to be ultra_secure i.e. it wont let u put ur password in a shell script as it sees it as a hazard... :cool:
 
You could also have your login script change your umode. Setting your umode sets the default file privleges on files you create. Also see what spb said about setting up ssh key pairs (if it's supported on the remote system). You can also look at using the 'expect' language which is designed for automating tasks done via command line.

Brian
 
One more data point. If you create a public-private key pair with a password you can use ssh-agent or one of its front ends to do a single sign on. You enter your password there and it will then handle the authentication. This is particularly nice if you need to ssh too a box that you then need to ssh from, the authentication is passed up the chain and you need never enter the password.
 
Back
Top