Solaris OpenSSH clinet command line password

Posted on 2004-10-26
Last Modified: 2013-12-05
Does anyone know how to pass a password via command line with OpenSSH for Solaris?

Question by:factsmgt
    LVL 51

    Accepted Solution

    openssh does not accept password on command line, for obvious reson ;-)
    use a key instead
    LVL 48

    Assisted Solution

    man ssh-keygen
    man ssh-add
    man ssh-agent
    LVL 38

    Assisted Solution

    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

    Author Comment

    Does anyone know of an ssh client that will run on Solaris that supports the passing of the password via command line?
    LVL 14

    Assisted Solution

    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.
    LVL 38

    Expert Comment

    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!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

     Java Android Coding Bundle

    Whether you're an Apple user or Android addict, learning to code for the Android platform is an extremely valuable, in-demand skill. It all starts with Java, the language behind the apps and games that make Android the top platform it is today.

    Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
    Recently, I read that Microsoft has analysed statistics for their security intelligence report. It revealed: still, the clear majority of windows users do their daily work as administrator. An administrative account is a burden, security-wise. My ar…
    This tutorial goes over how to archive and restore FreeBSD jails that are managed by ezjail.
    Video by: Phil
    This video goes over how to configure and start a jail in FreeBSD.  This video is meant to supplement the following article:

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now