ssh command with password


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ssh command with password
# 1  
Old 11-01-2010
Network ssh command with password

hi:
how can i use ssh with password in the command line .
# 2  
Old 11-01-2010
ssh does not accept password on command line (and it won't accept it piped into standard input either). The correct way to use ssh without passwords (eg within an automatted script or cronjob) is to use public/private key authentication.

There are heaps of articles on how this is done, a quick google search turned up this Password-less logins with OpenSSH
This User Gave Thanks to Chubler_XL For This Post:
# 3  
Old 11-01-2010
it seems as if the pipe does not work here?
# 4  
Old 11-01-2010
That's correct a security feature of ssh insists that input comes from a terminal not piped input. This is good because it avoids account passwords being kept in places that are insecure, especially as there is a way to do this properly (ie with public/private keys).
# 5  
Old 11-01-2010
thanks a lot
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

SSH password less setup asking for password

Hello Experts, when I am trying to connect my target server through sftp after creating ssh password less setup, it is asking for passowrd to connect. to setup this I followed below process: -->generated keys by executing the command "ssh-keygen -t rsa" -->this created my .ssh directory... (9 Replies)
Discussion started by: Devipriya Ch
9 Replies

2. UNIX for Dummies Questions & Answers

Ssh command without password - Not working

Hi, I have followed the below commands for key generation and ssh from one server to another with user mqm cd /var/mqm/.ssh mqm@A:~> ssh-keygen -t rsa <public key creation> mqm@A:~> ssh mqm@B mkdir -p .ssh mqm@B's password: <entered_password> mqm@A:~> cat /var/mqm/.ssh/id_rsa.pub | ssh... (4 Replies)
Discussion started by: Anusha M
4 Replies

3. Shell Programming and Scripting

Passing password with SSH command

Hi Experts, I have specific requirement where I want to pass the password with the ssh username@hostname command . I dont want to use RSA public and private keys also. Because that will be on production server and no one wants to give access like that. Second thing it is production... (14 Replies)
Discussion started by: sharsour
14 Replies

4. Shell Programming and Scripting

Password in ssh

Hello Guys, I have a specific requirement where I need to provide password to ssh and sftp in my script on Solaris. I know password-less connection is the way without password but in my case, I cant use the same due to some limitations. Please let me know if we can tweak it. (7 Replies)
Discussion started by: Deei
7 Replies

5. Red Hat

ssh without password

Hi, I am trying to generate ssh without having to type a password. I have done this on numerous occasions using the procedure below and it has worked fine but not on this occasion. user1@sys1:ssh-keygen -t dsa -N "" <press enter for any questions> user1@sys1: ll .ssh/id_dsa.pub... (16 Replies)
Discussion started by: Duffs22
16 Replies

6. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

7. UNIX for Dummies Questions & Answers

SSH with no password

How to setup SSH to not require a password when establishing an SSH connection from server A to server B for particular user? (4 Replies)
Discussion started by: sam101
4 Replies

8. Shell Programming and Scripting

SSH with password

Please help me I want connect to orther server using ssh. But I need to transfer password also without entering when it is prompts. Please help me. (1 Reply)
Discussion started by: saga499
1 Replies

9. Solaris

SSH Password-less login fails on password expiry.

Hi Gurus I have a few Sol 5.9 servers and i have enabled password less authentication between them for my user ID. Often i have found that when my password has expired,the login fails. Resetting my password reenables the keys. Do i need to do something to avoid this scenario or is this... (2 Replies)
Discussion started by: Renjesh
2 Replies

10. UNIX for Dummies Questions & Answers

SSH with a --password command line???

Has anyone heard of an OpenSSH client being compiled with an additional command-line option for password input? I realize there are reasons to NOT do this, and I realize you can achieve the same type of thing with keys, but I am specifically looking to pass the username & password BOTH on the... (5 Replies)
Discussion started by: jjinno
5 Replies
Login or Register to Ask a Question