Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Send SSH-Password over C-Program |
|---|---|
| Date: | Fri, 12 Oct 2007 09:16:48 -0700 |
On Thu, Oct 11, 2007 at 03:23:07PM -0700, mainway wrote:
[snip code]
You see i try to:
- start "ssh -l root server"
- send the password to the "root@server's password: " prompt
- send a command ("date") over SSH to the server.
I've found out that SSH doesn't expect the password over the
"normal-channel".
Does anybody know if there is the possibility to insert the password into
the "ssh -l root server"-command?
That would solve the problem...
Not sure about how to solve the programming problem. I have to ask, have you thought about using a key with no passphrase[0]? I'm assuming you want to use this for automation. ssh -l root -i ~/.ssh/id_rsa "date" If not there are other open source programs out there [1] that do something similar as far as passing things to ssh. Also, I know expect [2] can pass arguments such as passwords to ssh as well. HTH, ~ stevo [0] - http://pkeck.myweb.uga.edu/ssh/ [1] - http://clusterssh.wiki.sourceforge.net/Main+Page [2] - http://rootprompt.org/article.php3?article=9187
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: .ssh/config equivalent of -q ?, Jason Bradley Nance |
|---|---|
| Next by Date: | Re: .ssh/config equivalent of -q ?, Sarkhan Elkhanzade |
| Previous by Thread: | Send SSH-Password over C-Program, mainway |
| Next by Thread: | Re: Send SSH-Password over C-Program, Jeremy C. Reed |
| Indexes: | [Date] [Thread] [Top] [All Lists] |