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.

--HG--
branch : dbclient-netcat-alike
extra : convert_revision : d1f69334581dc4c35f9ca16aa5355074c9dd315d
This commit is contained in:
Matt Johnston
2006-03-21 16:16:41 +00:00
parent 3f49fc5f2c
commit cdbe853595
3 changed files with 46 additions and 5 deletions

View File

@@ -213,10 +213,10 @@ static void cli_sessionloop() {
case USERAUTH_SUCCESS_RCVD:
#ifdef ENABLE_CLI_LOCALTCPFWD
setup_localtcp();
//setup_localtcp();
#endif
#ifdef ENABLE_CLI_REMOTETCPFWD
setup_remotetcp();
//setup_remotetcp();
#endif
cli_send_chansess_request();
TRACE(("leave cli_sessionloop: cli_send_chansess_request"))