Mercurial > dropbear
comparison cli-session.c @ 296:6b41e2cbf071 dbclient-netcat-alike
A hack to make dbclient to tcp forwarding netcat style.
eg
./dbclient -i testkey -L 1234:remotehost:remoteport tunnelhost
will ssh to tunnelhost (using testkey, there's no way to ask for a password)
and then tcpfwd to remotehost:remoteport on stdin/stdout.
There's no way to give a cmdline password, so -i for a keyfile will have to do.
Yet another reason for agent forwarding.
The 1234 is a dummy var, I think it has to be a valid portnumber though.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 21 Mar 2006 16:16:41 +0000 |
parents | 3be7ae2e8dfa |
children | d4f32c3443ac |
comparison
equal
deleted
inserted
replaced
295:03f65e461915 | 296:6b41e2cbf071 |
---|---|
211 return; | 211 return; |
212 */ | 212 */ |
213 | 213 |
214 case USERAUTH_SUCCESS_RCVD: | 214 case USERAUTH_SUCCESS_RCVD: |
215 #ifdef ENABLE_CLI_LOCALTCPFWD | 215 #ifdef ENABLE_CLI_LOCALTCPFWD |
216 setup_localtcp(); | 216 //setup_localtcp(); |
217 #endif | 217 #endif |
218 #ifdef ENABLE_CLI_REMOTETCPFWD | 218 #ifdef ENABLE_CLI_REMOTETCPFWD |
219 setup_remotetcp(); | 219 //setup_remotetcp(); |
220 #endif | 220 #endif |
221 cli_send_chansess_request(); | 221 cli_send_chansess_request(); |
222 TRACE(("leave cli_sessionloop: cli_send_chansess_request")) | 222 TRACE(("leave cli_sessionloop: cli_send_chansess_request")) |
223 cli_ses.state = SESSION_RUNNING; | 223 cli_ses.state = SESSION_RUNNING; |
224 return; | 224 return; |