search for: ssh_channel_rport_listener

Displaying 17 results from an estimated 17 matches for "ssh_channel_rport_listener".

2001 Jul 04
1
remote forwarding in 2.9p2
...nnels.c, I found that nextstate was defined as : nextstate = (c->host_port == 0) ? SSH_CHANNEL_DYNAMIC : SSH_CHANNEL_OPENING; And later comes the call : if (nextstate != SSH_CHANNEL_DYNAMIC) port_open_helper(nc, rtype); It turns out that on the server-side, for a channel type of SSH_CHANNEL_RPORT_LISTENER, c->host_port is 0 and therefore, per the above code, nextstate == SSH_CHANNEL_DYNAMIC and port_open_helper() is not called. I am not sure what the function of SSH_CHANNEL_DYNAMIC is but it looks like it has something to do with socks4 (from looking at channel_pre_dynamic()) and probably doesn&...
2001 Aug 16
1
port-forwarding problem!?
Using OpenSSH_2.9p2 on Linux and Sparc Solaris. Trying to connect from Linux to Solaris, with remote port-forwarding i.e. On Linux, ssh -R 3000:Linux:23 Solaris The connection is established okay, but the port-forwarding does not work; on Solaris, the connection to localhost port 3000 is accepted, but it appears as if no data makes it back to port 23 on Linux. If an older 1.2.30 sshd is used
2001 Sep 26
1
Protocol 2 remote port forwarding
Hi all, I'm using openssh-2.9p2 on Solaris 2.8. I can get remote port forwarding to work using the -R flag, but only with ssh protocol 1 not ssh protocol 2. I've read that remote forwarding protocol 2 was not supported in earlier versions of openssh, but I'm wondering if this is still the case. Jarno Huuskonen [Jarno.Huuskonen at uku.fi], posted a patch in 2000 to add support for
2011 Sep 08
1
Dynamic port remote listener - a BUG?
...o client), but forwarding was refused. So I checked the source. in channels.c, function: channel_setup_fwd_listener /* * listen_port == 0 requests a dynamically allocated port - * record what we got. */ if (type == SSH_CHANNEL_RPORT_LISTENER && listen_port == 0 && allocated_listen_port != NULL && *allocated_listen_port == 0) { *allocated_listen_port = get_sock_port(sock, 1); debug("Allocated listen port %d",...
2013 Aug 05
2
RemoteForward and dynamically allocated listen port
...+++ session.c 2013-08-05 09:58:00.017397667 -0700 @@ -1307,6 +1307,17 @@ child_set_env(&env, &envsize, SSH_AUTHSOCKET_ENV_NAME, auth_sock_name); + char name[256]; + u_int n = 0; + for (i = 0; i < 100; i++) { + Channel *c = channel_by_id(i); + if (c == NULL || c->type != SSH_CHANNEL_RPORT_LISTENER) + continue; + snprintf(name, sizeof name, "SSH_REMOTE_FORWARD_PORT_%d", n); + snprintf(buf, sizeof buf, "%d", c->listening_port); + child_set_env(&env, &envsize, name, buf); + } + /* read $HOME/.ssh/environment. */ if (options.permit_user_env && !opt...
2002 Sep 06
0
use of setsockopt(SO_LINGER)
...diff -u -r1.180 channels.c --- channels.c 4 Jul 2002 08:12:15 -0000 1.180 +++ channels.c 4 Sep 2002 17:12:51 -0000 @@ -2016,7 +2016,6 @@ struct addrinfo hints, *ai, *aitop; const char *host; char ntop[NI_MAXHOST], strport[NI_MAXSERV]; - struct linger linger; success = 0; host = (type == SSH_CHANNEL_RPORT_LISTENER) ? @@ -2059,13 +2058,13 @@ continue; } /* - * Set socket options. We would like the socket to disappear - * as soon as it has been closed for whatever reason. + * Set socket options. + * Allow local port reuse in TIME_WAIT. */ - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &am...
2004 Aug 05
1
LocalForward and RemoteForward bind patch
...en on */ char *host_to_connect; /* Connect to 'host'. */ u_short port_to_connect; /* Connect to 'port'. */ u_short listen_port; /* Remote side should listen port number. */ @@ -2146,8 +2147,7 @@ char ntop[NI_MAXHOST], strport[NI_MAXSERV]; success = 0; - host = (type == SSH_CHANNEL_RPORT_LISTENER) ? - listen_addr : host_to_connect; + host = host_to_connect; if (host == NULL) { error("No forward host name."); @@ -2167,7 +2167,8 @@ hints.ai_flags = gateway_ports ? AI_PASSIVE : 0; hints.ai_socktype = SOCK_STREAM; snprintf(strport, sizeof strport, "%d", list...
2013 May 15
1
[PATCH] Expose remote forwarding ports as environment variable
...channel_list_rport_listener(char *buf, size_t size) +{ + u_int i, j, num_ports = 0; + int offset = 0; + int *ports; + int skip; + + ports = xcalloc(channels_alloc, sizeof(int)); + + for (i = 0; i < channels_alloc; i++) { + skip = 0; + Channel *c = channels[i]; + if (c == NULL || c->type != SSH_CHANNEL_RPORT_LISTENER) + continue; + + /* Skip already added ports - IPv4 + IPv6 == same port twice */ + for(j = 0; j < num_ports; j++) { + if (ports[j] == c->listening_port) { + skip = 1; + break; + } + } + + if(skip) continue; + + ports[num_ports] = c->listening_port; + num_ports++; + + if(...
2015 Sep 26
5
[Bug 2473] New: sshd and -R port forwardings on 127.0.0.0/8
https://bugzilla.mindrot.org/show_bug.cgi?id=2473 Bug ID: 2473 Summary: sshd and -R port forwardings on 127.0.0.0/8 Product: Portable OpenSSH Version: 6.6p1 Hardware: Other OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: sshd Assignee: unassigned-bugs at
2003 Nov 09
10
[Bug 756] sshd does not support global request cancel-tcpip-forward
http://bugzilla.mindrot.org/show_bug.cgi?id=756 Summary: sshd does not support global request cancel-tcpip- forward Product: Portable OpenSSH Version: -current Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: sshd AssignedTo: openssh-bugs at
2001 Oct 24
2
disable features
...n); } } +#endif static void channel_handler_init_20(void) { channel_pre[SSH_CHANNEL_OPEN] = &channel_pre_open_20; - channel_pre[SSH_CHANNEL_X11_OPEN] = &channel_pre_x11_open; +#ifdef WITH_TCPFWD channel_pre[SSH_CHANNEL_PORT_LISTENER] = &channel_pre_listener; channel_pre[SSH_CHANNEL_RPORT_LISTENER] = &channel_pre_listener; - channel_pre[SSH_CHANNEL_X11_LISTENER] = &channel_pre_listener; - channel_pre[SSH_CHANNEL_AUTH_SOCKET] = &channel_pre_listener; channel_pre[SSH_CHANNEL_CONNECTING] = &channel_pre_connecting; +#ifdef WITH_DYNFWD channel_pre[SSH_CHANNEL_DYNAMIC] = &a...
2002 Jan 05
2
new feature w/ patch
...@ -2080,7 +2080,7 @@ int success, sock, on = 1, type; struct addrinfo hints, *ai, *aitop; char ntop[NI_MAXHOST], strport[NI_MAXSERV]; - const char *host; + const char *host, *listen_host = NULL; struct linger linger; success = 0; @@ -2089,6 +2089,7 @@ host = listen_address; type = SSH_CHANNEL_RPORT_LISTENER; } else { + listen_host = listen_address; host = host_to_connect; type = SSH_CHANNEL_PORT_LISTENER; } @@ -2108,7 +2109,7 @@ hints.ai_flags = gateway_ports ? AI_PASSIVE : 0; hints.ai_socktype = SOCK_STREAM; snprintf(strport, sizeof strport, "%d", listen_port); - if (getadd...
2000 May 09
1
2.9: remote port forwarding doesn't work
Hello, I'm running OpenBSD 2.9 (-rOPENBSD_2_9) on i386. Remote port forwarding doesn't work. Attached are 2 logs of ssh -v -R2828:localhost:22 localhost and sshd -p 2222 -d Note that server tries to forward to Connection to port 2828 forwarding to 0.0.0.0 port 0 requested. instead of localhost port 22 as it should. what ssh, what sshd and /etc/sshd_config are also attached. Thanks
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...SSH_CHANNEL_CONNECTING: case SSH_CHANNEL_ZOMBIE: continue; @@ -573,6 +576,7 @@ channel_find_open(void) switch (c->type) { case SSH_CHANNEL_CLOSED: case SSH_CHANNEL_DYNAMIC: + case SSH_CHANNEL_RDYNAMIC: case SSH_CHANNEL_X11_LISTENER: case SSH_CHANNEL_PORT_LISTENER: case SSH_CHANNEL_RPORT_LISTENER: @@ -635,6 +639,7 @@ channel_open_message(void) case SSH_CHANNEL_OPENING: case SSH_CHANNEL_CONNECTING: case SSH_CHANNEL_DYNAMIC: + case SSH_CHANNEL_RDYNAMIC: case SSH_CHANNEL_OPEN: case SSH_CHANNEL_X11_OPEN: case SSH_CHANNEL_INPUT_DRAINING: @@ -1033,14 +1038,23 @@ channel_decode_...
2001 Jun 20
8
[Lutz.Jaenicke@aet.TU-Cottbus.DE: 2.9p1: HP-UX 10.20 utmp/wtmp handling broken?]
Hi! I am resending the following message about problems with utmp handling. * In the meantime I had some request in private mail from people asking whether I have new information. * The problem is still persistant in 2.9p2. * My own new investigations show, that the problem only appears with protocol 2, not with protocol 1, I therefore only started to note it when protocol 2 became the
2010 Jan 14
1
ssh(1) multiplexing rewrite
...->sock, SHUT_RDWR); - if (c->ctl_fd != -1) - shutdown(c->ctl_fd, SHUT_RDWR); channel_close_fds(c); buffer_free(&c->input); buffer_free(&c->output); @@ -518,6 +517,7 @@ channel_still_open(void) case SSH_CHANNEL_X11_LISTENER: case SSH_CHANNEL_PORT_LISTENER: case SSH_CHANNEL_RPORT_LISTENER: + case SSH_CHANNEL_MUX_LISTENER: case SSH_CHANNEL_CLOSED: case SSH_CHANNEL_AUTH_SOCKET: case SSH_CHANNEL_DYNAMIC: @@ -531,6 +531,7 @@ channel_still_open(void) case SSH_CHANNEL_OPENING: case SSH_CHANNEL_OPEN: case SSH_CHANNEL_X11_OPEN: + case SSH_CHANNEL_MUX_CLIENT: return 1...
2001 May 04
19
SSH connection hanging on logout
I am running OpenSSH 2.9p1 on SunOS 5.7 w/4-24-2001 patch cluster. Like many other users I am seeing the hanging session on logout with background processes. This is a huge problem for me as I centrally manage 50+ machines with rdist across ssh. Instead of just complaining about the problem I thought I would put my CS degree to use and try to track down the problem myself. For starters,