rx: remove ssh code
This commit is contained in:
parent
b7103d1517
commit
03c44c44b0
|
@ -17,7 +17,6 @@ int call(char *, char*, char*, char**);
|
|||
char *buildargs(char*[]);
|
||||
int send(int);
|
||||
void error(char*, char*);
|
||||
void sshexec(char*, char*);
|
||||
|
||||
void
|
||||
usage(void)
|
||||
|
@ -71,14 +70,6 @@ main(int argc, char *argv[])
|
|||
rex(fd, args);
|
||||
close(fd);
|
||||
|
||||
/* if there's an ssh port, try that */
|
||||
fd = call("tcp", host, "ssh", &addr);
|
||||
if(fd >= 0){
|
||||
close(fd);
|
||||
sshexec(host, args);
|
||||
/* falls through if no ssh */
|
||||
}
|
||||
|
||||
/* specific attempts */
|
||||
fd = call("tcp", host, "shell", &addr);
|
||||
if(fd >= 0)
|
||||
|
@ -216,27 +207,6 @@ tcpexec(int fd, char *addr, char *cmd)
|
|||
exits(0);
|
||||
}
|
||||
|
||||
void
|
||||
sshexec(char *host, char *cmd)
|
||||
{
|
||||
char *argv[10];
|
||||
int n;
|
||||
|
||||
n = 0;
|
||||
argv[n++] = "ssh";
|
||||
argv[n++] = "-iCm";
|
||||
if(!returns)
|
||||
argv[n++] = "-r";
|
||||
if(ruser){
|
||||
argv[n++] = "-l";
|
||||
argv[n++] = ruser;
|
||||
}
|
||||
argv[n++] = host;
|
||||
argv[n++] = cmd;
|
||||
argv[n] = 0;
|
||||
exec("/bin/ssh", argv);
|
||||
}
|
||||
|
||||
int
|
||||
send(int fd)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue