Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Solaris OpenSSH clinet command line password

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

Thanx
0
Comment
Question by:factsmgt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 128 total points
ID: 12415418
openssh does not accept password on command line, for obvious reson ;-)
use a key instead
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 124 total points
ID: 12415875
man ssh-keygen
man ssh-add
man ssh-agent
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 124 total points
ID: 12418070
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:
    http:Q_20610462.html

To use expect, you can download expect from:
http://sunfreeware.com/

then use "autoexpect" to create an expect script and then modify the script.
man autoexpect
to learn more details
0
2017 Webroot Threat Report

MSPs: Get the facts you need to protect your clients.
The 2017 Webroot Threat Report provides a uniquely insightful global view into the analysis and discoveries made by the Webroot® Threat Intelligence Platform to provide insights on key trends and risks as seen by our users.

 

Author Comment

by:factsmgt
ID: 12422442
Does anyone know of an ssh client that will run on Solaris that supports the passing of the password via command line?
0
 
LVL 14

Assisted Solution

by:chris_calabrese
chris_calabrese earned 124 total points
ID: 12423488
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.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 12429365
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!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
OfficeMate Freezes on login or does not load after login credentials are input.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

636 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