search for: newsock

Displaying 20 results from an estimated 98 matches for "newsock".

Did you mean: newrock
2001 Aug 24
2
[PATCH] SO_KEEPALIVE for port forwards
...u Aug 23 15:40:43 2001 @@ -61,6 +61,9 @@ #include "canohost.h" #include "key.h" #include "authfd.h" +#include "readconf.h" + +extern Options options; /* Maximum number of fake X11 displays to try. */ #define MAX_DISPLAYS 1000 @@ -765,6 +768,7 @@ int newsock, newch, nextstate; socklen_t addrlen; char *rtype; + int one = 1; if (FD_ISSET(c->sock, readset)) { debug("Connection to port %d forwarding " @@ -781,6 +785,13 @@ if (newsock < 0) { error("accept: %.100s", strerror(errno)); return; + } + /* Set keep...
2000 Oct 07
2
[PATCH]: Add tcp_wrappers protection to port forwarding
...t;authfd.h" +#ifdef LIBWRAP +#include <tcpd.h> +#include <syslog.h> +#endif /* LIBWRAP */ + /* Maximum number of fake X11 displays to try. */ #define MAX_DISPLAYS 1000 @@ -581,6 +586,30 @@ channel_post_port_listener(Channel *c, f } remote_hostname = get_remote_hostname(newsock); remote_port = get_peer_port(newsock); +#ifdef LIBWRAP + { + char fwd[80]; + void (*sigch) (int); + int res; + struct request_info req; + + snprintf(fwd, sizeof(fwd), "sshdfwd-%d", c->host_port); + request_init(&req, RQ_DAEMON, fwd, RQ_FILE, newsock, NULL); + fro...
1999 Nov 20
1
openssh and DOS
...ening. */ - if ((pid = fork()) == 0) - { - /* Child. Close the listening socket, and start using - the accepted socket. Reinitialize logging (since our - pid has changed). We break out of the loop to handle - the connection. */ - close(listen_sock); - sock_in = newsock; - sock_out = newsock; - log_init(av0, options.log_level, options.log_facility, log_stderr); - break; + /* Make sure we don't have too many connections. */ + if (options.max_connections > 0 + && current_connections >= options.max_connections)...
2020 Jan 21
3
Instrumentation for metrics
> This makes me think that the syslog approach is probably the way to go Yeah, right. Another idea is to mirror the current preauth load via setproctitle()... That makes that data accessible even without a syscall (at least the writing of the data - quering needs syscalls, right), so that can be kept up-to-date and allows a high monitoring frequency as well. Multiple instances of SSHd (on
2005 Nov 16
3
OpenSSH on NCR MPRAS
Hi folks, I have successfully compiled and run OpenSSH 4.1p1 on NCR MPRAS: $ uname -a UNIX_SV support1 4.0 3.0 3446 Pentium Pro(TM)-EISA/PCI $ However, I have found one pretty critical problem, arising from the way that MPRAS handles changes to the IP stack. Background: To update any of the IP or TCP configuration options, system administrators should use the program "tcpconfig".
2002 May 29
2
[PATCH] Add config option disabling drop_connection() behavior
...ds some threshold. See the +"MaxStartups" configuration option for more information. .It Cm MaxStartups Specifies the maximum number of concurrent unauthenticated connections to the .Nm --- sshd.c 2002/05/29 03:50:13 1.1 +++ sshd.c 2002/05/29 03:55:59 @@ -1243,7 +1243,8 @@ close(newsock); continue; } - if (drop_connection(startups) == 1) { + if (options.check_max_startups && + drop_connection(startups) == 1) { debug("drop connection #%d", startups); close(newsock); continue;
2001 Nov 27
1
[PATCH] tcp-wrappers support extended to x11 forwards
.../* -- channel core */ @@ -1006,6 +1012,25 @@ error("accept: %.100s", strerror(errno)); return; } +#ifdef LIBWRAP + /* XXX LIBWRAP noes not know about IPv6 */ + { + struct request_info req; + + request_init(&req, RQ_DAEMON, "sshdfwd-X11", RQ_FILE, newsock, 0); + fromhost(&req); + + if (!hosts_access(&req)) { + syslog(deny_severity, "refused fwd-X11 connect from %s", eval_client(&req)); + close(newsock); + + return; + } + syslog(allow_severity, "fwd-X11 connect from %s", eval_client...
2000 Jun 27
1
openssh-2.1.1p1 on Irix6.2 report
...GRAM=\"/usr/local/bin/ssh\" -DSSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh/ssh-askpass\" -DHAVE_CONFIG_H -c channels.c "channels.c", line 516: warning(1164): argument of type "socklen_t *" is incompatible with parameter of type "int *" newsock = accept(c->sock, &addr, &addrlen); ^ "channels.c", line 572: warning(1164): argument of type "socklen_t *" is incompatible with parameter of type "int *" newsock = accept(c->sock, &addr, &addrle...
2010 May 13
1
sshd dies if passed host key with relative path on command line
...h on linux and hp-ux, it will still fails: In hp-ux, server side: root at sshia2# /opt/ssh/sbin/sshd -p 1234 -D -h ssh_host_dsa_key -ddd .......... debug3: send_rexec_state: entering fd = 9 config len 322 debug3: ssh_msg_send: type 0 debug3: send_rexec_state: done debug1: rexec start in 6 out 6 newsock 6 pipe -1 sock 9 client side: $ ssh sshia2 -p 1234 -vvv OpenSSH_5.5p1+sftpfilecontrol-v1.3-hpn13v7, OpenSSL 0.9.8n 24 Mar 2010 HP-UX Secure Shell-A.05.50.002.LdapTest, HP-UX Secure Shell version debug1: Reading configuration data /opt/ssh/etc/ssh_config debug3: RNG is ready, skipping seeding...
2015 Dec 09
2
Fwd: sshd "getpeername failed: Transport endpoint is not connected" error
Hello, everybody. I've recently encountered a problem with OpenSSH server. Could you help me to troubleshoot it? I've configured 2 IP interfaces[1]: one with a public IP adress and one with a private address. When I connect[2] through the public interface (ens34), SSH works fine, but when I connect[3] through the private interface (ens32), I receive a rather cryptic message on my client
2020 Jan 21
2
Instrumentation for metrics
...ange that matches the commit message. Was that intentional? -- Craig Miskell Site Reliability Engineer | GitLab | Dunedin, New Zealand diff --git a/sshd.c b/sshd.c index 6129b0a..debbdcb 100644 --- a/sshd.c +++ b/sshd.c @@ -1005,7 +1005,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) { fd_set *fdset; int i, j, ret, maxfd; - int startups = 0, listening = 0, lameduck = 0; + int ostartups = -1, startups = 0, listening = 0, lameduck = 0; int startup_p[2] = { -1 , -1 }; char c = 0; struct sockaddr_storage from; @@ -1029,6 +1029,11 @@ server_accept_lo...
2005 Apr 21
0
openssh 4.0p1 under OSX
...rt 22 on ::. Server listening on :: port 22. debug1: Bind to port 22 on 0.0.0.0. Server listening on 0.0.0.0 port 22. Generating 768 bit RSA key. RSA key generation complete. debug1: fd 5 clearing O_NONBLOCK debug1: Server will not fork when running in debugging mode. debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8 debug1: inetd sockets after dupping: 4, 4 Connection from ::1 port 55838 debug1: Client protocol version 2.0; client software version OpenSSH_4.0 debug1: match: OpenSSH_4.0 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-1.99-OpenS...
2002 Dec 18
2
patch for openssh3.5p1 - adds logging option
...__progname, options.log_level, options.log_facility, log_stderr); + log_init(__progname, options.log_level, options.log_facility, log_stderr, options.log_file); /* Initialize the random number generator. */ arc4random_stir(); @@ -1352,7 +1352,7 @@ close_listen_socks(); sock_in = newsock; sock_out = newsock; - log_init(__progname, options.log_level, options.log_facility, log_stderr); + log_init(__progname, options.log_level, options.log_facility, log_stderr, options.log_file); break; } }
2016 Jan 26
2
Questions about inferred state machines for OpenSSH
Dear all, For my thesis, I've been working on automatic inference of state machines for SSH servers. I ran into a couple of particularities regarding OpenSSH's inferred state machine, and was hoping some of you might be interested. Maybe you can even shed some light on it. Setup: I'm using LearnLib's (Java) version of the L* learning algorithm [1] to come up with sequences of
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
2003 May 06
0
OpenSSH Bug / Fix
...e main connection. This can cause buffering of data flowing from the server, but not the other direction. The fix that we have proven to work is to add the following code of the most recent source release: In the "main" function of "sshd.c": - add a call to "set_nodelay(newsock)" immediately after the "accept()" call. This will ensure that data travelling from this socket will not buffer and cause a bursting effect for small ammounts of data being sent at a fast rate. Thank you, Brian Genisio Oasis Advanced Engineering
2003 May 07
4
[Bug 556] TCP_NODELAY not set completely for port forwarding
...eering.com When port forwarding is set up, TCP_NODELAY is set on the ports, in order to prevent buffering. This flag is not set in the actual SSH connection. This causes data that flows from the server to the client to be buffered, causing a bursing effect. The solution is to add set_nodelay(newsock) after the accept call in the main function. This solves the problem, but requires TCP_NODELAY to be set on all connections, regardless of port forwards. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
2005 Dec 01
1
Sending SSH_MSG_DISCONNECT before dropping connections
...er of concurrent sessions the OpenSSH server opens. My concern is how OpenSSH handles the case where this number is reached. >From the code it looks like it simply closes the socket: sshd.c:1440 if (drop_connection(startups) == 1) { debug("drop connection #%d", startups); close(newsock); continue; } Why is there no disconnect message sent that explains to the client why the socket was closed? >From draft-ietf-secsh-transport-24.txt, chapter 11: ---------------------------------------------------------- 11. Additional Messages Either party may send any of the followin...
2006 Jul 12
1
Stange sshd problem... bug?
...1.99, remote software version OpenSSH_4.3 debug1: match: OpenSSH_4.3 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.3 debug1: SSH2_MSG_KEXINIT sent And from the server: Jul 12 03:12:13 web1 sshd[3707]: debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7 Jul 12 03:12:13 web1 sshd[1839]: debug1: Forked child 3707. Jul 12 03:12:13 web1 sshd[3707]: debug1: inetd sockets after dupping: 3, 3 Jul 12 03:12:13 web1 sshd[3707]: Connection from **IP-removed** port 47346 Jul 12 03:12:13 web1 sshd[3707]: debug1: Client protocol version 2.0; cli...