Solaris OpenSSH clinet command line password

Does anyone know how to pass a password via command line with OpenSSH for Solaris?

Who is Participating?
ahoffmannConnect With a Mentor Commented:
openssh does not accept password on command line, for obvious reson ;-)
use a key instead
TintinConnect With a Mentor Commented:
man ssh-keygen
man ssh-add
man ssh-agent
yuzhConnect With a Mentor Commented:
If you are using script to run ssh remote command, you can write an expect script to handle the password or setup ssh login without password.

to setup ssh without password, have a look at the procedures in:

To use expect, you can download expect from:

then use "autoexpect" to create an expect script and then modify the script.
man autoexpect
to learn more details
Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

factsmgtAuthor Commented:
Does anyone know of an ssh client that will run on Solaris that supports the passing of the password via command line?
chris_calabreseConnect With a Mentor Commented:
Passing a password on the command line is insecure. If you are running SSH, you care about security. Therefore you should never pass a password on the command line.

SSH addresses this problem by supporting keys for autehthentication. Use them.
You can pass the passwd as a commandline arg to an expect script to use ssh, but is
 insecure as mentioned in chris_calabrese's comment.

other user can simply use "ps" command with -o args to read your password!
All Courses

From novice to tech pro — start learning today.