Re: Calling ssh from C-Program with execvp




This program works for me:

---------------------------------------------------------------
#include <stddef.h>
#include <sys/types.h>
#include <sys/wait.h>

main ()
{
int status;
char *argv[] = {"ssh","remote_host","echo","foo",NULL};

if (fork()) {
wait(&status);
} else {
execvp("/usr/bin/ssh", argv);
}
}
---------------------------------------------------------------

Since the log shows successful authentication, something is happening
during the login. Try -n in case something waiting for input, as well as
-v as Doug suggested. Also, you might try putting aside any shell init
files on the remote side.

--
Richard Silverman
res@xxxxxxxx

.



Relevant Pages

  • [UNIX] ATP HTTP Daemon Buffer Overflow
    ... A security vulnerability in the product allows remote ... NULL char to the end of the string. ... int start_byte; ... of buffer's string (without any environment variables except '_')! ...
    (Securiteam)
  • [VSA0302] Half-Life Adminmod remote (root) hole
    ... Adminmod versions 2.50.25a and 2.50.50 on Windows and Linux, ... hoagie_adminmod - remote exploit for hlds servers using the adminmod plugin ... char rcon_pwd; ... int exec_sh ...
    (Bugtraq)
  • [VSA0302] Half-Life Adminmod remote (root) hole
    ... Adminmod versions 2.50.25a and 2.50.50 on Windows and Linux, ... hoagie_adminmod - remote exploit for hlds servers using the adminmod plugin ... char rcon_pwd; ... int exec_sh ...
    (Bugtraq)
  • [NT] WinCom LPD Total Multiple Vulnerabilities
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... have been discovered in WinCom LPD Total, these allow a remote attacker to ... void fgetz(u8 *data, int size, FILE *fd); ... buff = malloc; ...
    (Securiteam)
  • [VSA0308] Half-Life AMX-Mod remote (root) hole
    ... Due to a format string bug in AMX, ... hoagie_amx - remote exploit for hlds servers using the amx plugin ... int exec_sh ... struct sockaddr_in sin; ...
    (Bugtraq)