I want to automate this SSH tunneling command on OS X.
ssh -D port account@server
The shell will prompt you to enter the password.
Is it possible to automate it with something like The Automator? any solution is welcomed.
The best way to automatically create an SSH tunnel is to set up a public/private key pair - that way you can authenticate without a password.
There are some good instructions here. It even gives an example of using the SSH connection in a Perl script - although you can use a Bash script or Automator's "Run shell script" action if you'd rather. You can ignore most of the parameters to