[prev in list] [next in list] [prev in thread] [next in thread]
List: pam-list
Subject: RE: how to do ssh authentication using pam?
From: Ajay Agrawalla <aagrawalla () hyperchip ! com>
Date: 2003-01-07 21:17:05
[Download RAW message or body]
I don't think PAM would help here.. Each instance of SSH and in turn PAM
asks for password separately. What u might do is get the password yrself {
getpass() } and the hack SSH to use this. Or try using identity keys...
HTH
ajay
-----Original Message-----
From: zhang@csee.wvu.edu [mailto:zhang@csee.wvu.edu]
Sent: Friday, January 03, 2003 12:04 PM
To: pam-list@redhat.com
Subject: how to do ssh authentication using pam?
I need to execute a series of commands using ssh in c code like the
following, but I want to do authentication or input password only once in
the beginning. Will pam help in this case ? Please show some c code. Thank
you.
int main(int argc, char** argv)
{
char* arg_list[] = {
"ssh",
"user@host",
"ls",
NULL
};
/* Now execute ssh */
execvp("ssh", arg_list);
}
Hanzhou zhang
_______________________________________________
Pam-list mailing list
Pam-list@redhat.com
https://listman.redhat.com/mailman/listinfo/pam-list
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: how to do ssh authentication using pam?</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>I don't think PAM would help here.. Each instance of SSH and in \
turn PAM asks for password separately. What u might do is get the password \
yrself { getpass() } and the hack SSH to use this. Or try using identity \
keys...</FONT></P>
<P><FONT SIZE=2>HTH</FONT>
</P>
<P><FONT SIZE=2>ajay</FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: zhang@csee.wvu.edu [<A \
HREF="mailto:zhang@csee.wvu.edu">mailto:zhang@csee.wvu.edu</A>]</FONT> <BR><FONT \
SIZE=2>Sent: Friday, January 03, 2003 12:04 PM</FONT> <BR><FONT SIZE=2>To: \
pam-list@redhat.com</FONT> <BR><FONT SIZE=2>Subject: how to do ssh authentication \
using pam?</FONT> </P>
<BR>
<P><FONT SIZE=2>I need to execute a series of commands using ssh in c code like \
the</FONT> <BR><FONT SIZE=2>following, but I want to do authentication or input \
password only once in</FONT> <BR><FONT SIZE=2>the beginning. Will pam help in this \
case ? Please show some c code. Thank</FONT> <BR><FONT SIZE=2>you.</FONT>
</P>
<BR>
<P><FONT SIZE=2>int main(int argc, char** argv)</FONT>
<BR><FONT SIZE=2>{</FONT>
<BR><FONT SIZE=2> char* arg_list[] = {</FONT>
<BR><FONT SIZE=2> "ssh",</FONT>
<BR><FONT SIZE=2> "user@host",</FONT>
<BR><FONT SIZE=2> "ls",</FONT>
<BR><FONT SIZE=2> NULL</FONT>
<BR><FONT SIZE=2> };</FONT>
</P>
<P><FONT SIZE=2> /* Now execute ssh */</FONT>
<BR><FONT SIZE=2> execvp("ssh", arg_list);</FONT>
</P>
<P><FONT SIZE=2>}</FONT>
</P>
<P><FONT SIZE=2>Hanzhou zhang</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<BR>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Pam-list mailing list</FONT>
<BR><FONT SIZE=2>Pam-list@redhat.com</FONT>
<BR><FONT SIZE=2><A HREF="https://listman.redhat.com/mailman/listinfo/pam-list" \
TARGET="_blank">https://listman.redhat.com/mailman/listinfo/pam-list</A></FONT> </P>
</BODY>
</HTML>
_______________________________________________
Pam-list mailing list
Pam-list@redhat.com
https://listman.redhat.com/mailman/listinfo/pam-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic