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.




Network Security Secure-Shell
[Top] [All Lists]

how can I input password in popen("ssh...") ?

Subject: how can I input password in popen("ssh...") ?
Date: Mon, 27 Jun 2005 23:14:04 +0800
Hello!

    I'm new to openssh.I used sshv2 with OpenSSH_3.8.1p1 and I can only use 
password authentication
in my server. 

    I forked a process to execute ssh , but I can't input password, how can I 
do it ?

   Below is my code:
 
   char *passwd = "xxxxxx\n"
   fp = popen("/usr/bin/ssh falls@192.168.10.234 ls /etc", "w");
   sleep(1)
   if ( fp )
       fwrite(passwd , strlen(passwd) , 1 ,fp)   // enter password here


Best Regards
falls huang

<Prev in Thread] Current Thread [Next in Thread>