Displaying 20 results from an estimated 38 matches for "strport".
Did you mean:
stlport
2018 Feb 23
6
RFC 8305 Happy Eyeballs in OpenSSH
...if it was used.
+ */
+static int
+ssh_connect_happy_eyeballs_initiate(const char *host, struct addrinfo *ai,
+ int *timeout_ms, int needpriv,
+ struct timeval *initiate,
+ int *nfds, fd_set *fds,
+ struct addrinfo *fd_ai[])
+{
+ int oerrno, sock;
+ char ntop[NI_MAXHOST], strport[NI_MAXSERV];
+
+ memset(ntop, 0, sizeof(ntop));
+ memset(strport, 0, sizeof(strport));
+ /* If *nfds != 0 then *initiate is initialised. */
+ if (*nfds &&
+ (ai == NULL ||
+ !ssh_connect_timeout(initiate, CONNECTION_ATTEMPT_DELAY)))
+ /* Do not initiate new connections yet */...
2001 Jun 09
2
[PATCH] Make "-L" local ports bind to "127.0.0.1" in openssh-2.9p1
...ot; is specified when "ssh" is
+ * started) are [ab]usable by any host which has a route
+ * to/from the this host.
*/
memset(&hints, 0, sizeof(hints));
hints.ai_family = IPv4or6;
hints.ai_flags = gateway_ports ? AI_PASSIVE : 0;
hints.ai_socktype = SOCK_STREAM;
snprintf(strport, sizeof strport, "%d", listen_port);
- if (getaddrinfo(NULL, strport, &hints, &aitop) != 0)
+ if (getaddrinfo(gateway_ports ? NULL : "127.0.0.1", strport, &hints, &aitop) != 0)
packet_disconnect("getaddrinfo: fatal error");
for (ai = aitop; ai; a...
2013 Jun 20
1
ProxyCommand that returns a socket
Hello,
My usage of ProxyCommand just calls the nc utility with various
parameters. That in turn after the initial setup just copies copies
the data from the network socket to stdin/stdout. This useless coping
can be avoided if ssh has an option to receive the socket from the
proxy command. I suppose it can improve network error reporting as ssh
would talk directly to the network socket rather
2001 Feb 17
2
Important fix (sshd && binding). Portable version only.
...ago
to djm but I still don't see this fix in openssh_cvs.
diff -urN openssh-2.3.0p1.org/sshd.c openssh-2.3.0p1/sshd.c
--- openssh-2.3.0p1.org/sshd.c Sat Jan 6 19:54:11 2001
+++ openssh-2.3.0p1/sshd.c Sat Jan 6 19:55:48 2001
@@ -782,10 +782,10 @@
debug("Bind to port %s on %s.", strport, ntop);
/* Bind the socket to the desired port. */
- if ((bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) &&
- (!ai->ai_next)) {
- error("Bind to port %s on %s failed: %.200s.",
- strport, ntop, strerror(errno));
+ if (bind(listen_sock, ai-&...
2017 Jan 12
3
proposed change to ssh_connect_direct()
On Sat, Jan 7, 2017 at 2:30 PM, Peter Moody <mindrot at hda3.com> wrote:
> so I spent a bit of time looking at this and it seems like the only
> way to go, at least if I want to keep it in ssh_connect_direct(), is
> to use pthreads. further, it seems like getting that accepted is
> something of a long shot:
Sorry, pthreads is a non-starter.
I would have thought that using
2005 Jun 12
2
%h,%p,%u expansion for ControlPath
...0)
options.proxy_command = NULL;
@@ -611,6 +622,42 @@ again:
if (options.control_path != NULL) {
options.control_path = tilde_expand_filename(
options.control_path, original_real_uid);
+
+ if (strchr(options.control_path, '%')) {
+ Buffer path;
+ const char *cp;
+ char strport[NI_MAXSERV];
+
+ /* Convert the port number into a string. */
+ snprintf(strport, sizeof strport, "%hu", options.port);
+
+ buffer_init(&path);
+ for (cp = options.control_path; *cp; cp++) {
+ if (cp[0] == '%' && cp[1] == '%') {
+ buffer_append(...
2002 Jul 17
2
[Patch] SSH through HTTP proxy using CONNECT
...iff -ur -x CVS /usr/src/crypto/openssh/sshconnect.c src/sshconnect.c
--- /usr/src/crypto/openssh/sshconnect.c Thu Sep 27 18:33:35 2001
+++ src/sshconnect.c Wed Jul 17 16:14:44 2002
@@ -198,7 +198,9 @@
int gaierr;
int on = 1;
int sock = -1, attempt;
+ int connect_port;
char ntop[NI_MAXHOST], strport[NI_MAXSERV];
+ const char *connect_host;
struct addrinfo hints, *ai, *aitop;
struct linger linger;
struct servent *sp;
@@ -218,14 +220,21 @@
if (proxy_command != NULL)
return ssh_proxy_connect(host, port, pw, proxy_command);
- /* No proxy command. */
+ /* If an HTTP proxy is given, con...
2002 Sep 06
0
use of setsockopt(SO_LINGER)
...=========
RCS file: /cvs/src/usr.bin/ssh/channels.c,v
retrieving revision 1.180
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....
2014 Jan 15
0
remote port forward failed because of failure resolving localhost to IP with error No such file or directory
...e forwarded-tcpip
The code relevant is here:
3133 /* Return CONNECTING channel to remote host, port */
3134 static Channel *
3135 connect_to(const char *host, u_short port, char *ctype, char *rname)
3136 {
3137 struct addrinfo hints;
3138 int gaierr;
3139 int sock = -1;
3140 char strport[NI_MAXSERV];
3141 struct channel_connect cctx;
3142 Channel *c;
3143
3144 memset(&cctx, 0, sizeof(cctx));
3145 memset(&hints, 0, sizeof(hints));
3146 hints.ai_family = IPv4or6;
3147 hints.ai_socktype = SOCK_STREAM;
3148 snprintf(strport, sizeof strport, "%d&...
2002 Feb 15
3
ssh can't resolve hostnames thru WINS
...pulated network.
Naturally, I set up Samba and added WINS as a name resolution option.
I found out that some programs now can use NetBIOS names, other can't.
openssh falls into latter category :-(
I found that openssh use this snippet to convert hostname to ip:
if((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
fatal("%s: %.100s: %s", __progname, host,
gai_strerror(gaierr));
and it fails for me exactly in this if() when I say "ssh <wins_name>".
OTOH, ping uses code similar to
struct hostent *hp;
hp = gethostbyname(hostname);
and this...
2013 Oct 07
4
Feature request: FQDN Host match
Hello!
I'm hoping that Gmail won't HTML format this mail so that I'll get flamed :)
Anyway, my question relates to ssh_config. The problem I find is that
the Host pattern is only applied to the argument given on the command
line, as outlined in the man page:
"The host is the hostname argument given on the command line (i.e. the
name is not converted to a canonicalized host name
2014 Jun 23
2
ListenAdress Exclusion
I was wondering what everyone's thoughts were on a simpler way to exclude
addresses from having listeners on them.
I know a lot of people have multiple subnets, especially larger
corporations.
Some networks are non-route-able, and therefor unsuitable for use with SSH,
aside from communication between other servers on the same subnet.
Given that we may want to exclude those non-route-able
2002 Jan 05
2
new feature w/ patch
...{
return channel_request_forwarding(
- NULL, listen_port,
+ listen_host, listen_port,
host_to_connect, port_to_connect,
gateway_ports, /*remote_fwd*/ 0);
}
@@ -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_...
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
.../* Return CONNECTING channel to remote host, port */
-static Channel *
-connect_to(const char *host, u_short port, char *ctype, char *rname)
+static int
+connect_to_helper(const char *host, u_short port, struct channel_connect *cctx)
{
struct addrinfo hints;
int gaierr;
int sock = -1;
char strport[NI_MAXSERV];
- struct channel_connect cctx;
- Channel *c;
- memset(&cctx, 0, sizeof(cctx));
+ memset(cctx, 0, sizeof(*cctx));
memset(&hints, 0, sizeof(hints));
hints.ai_family = IPv4or6;
hints.ai_socktype = SOCK_STREAM;
snprintf(strport, sizeof strport, "%d", port);
- if...
2006 Feb 24
5
[Bug 1162] Inappropriate sequence of syslog messages
http://bugzilla.mindrot.org/show_bug.cgi?id=1162
Summary: Inappropriate sequence of syslog messages
Product: Portable OpenSSH
Version: 4.2p1
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: sshd
AssignedTo: bitbucket at mindrot.org
ReportedBy:
2004 Aug 26
2
OpenSSH PATCH: OpenCommand and CloseCommand
...shconnect.c (revision 25)
@@ -55,6 +55,93 @@
static void warn_changed_key(Key *);
/*
+ * Run the given command
+ */
+int
+ssh_run_command(const char *type, const char *host, u_short port, const char *run_command)
+{
+ Buffer command;
+ const char *cp;
+ char *command_string;
+ pid_t pid;
+ char strport[NI_MAXSERV];
+ int status;
+
+ /* Convert the port number into a string. */
+ snprintf(strport, sizeof strport, "%hu", port);
+
+ /*
+ * Build the final command string in the buffer by making the
+ * appropriate substitutions to the given proxy command.
+ *
+ * Use "exec" to...
2014 Feb 10
0
[PATCH] Basic SCTP support for OpenSSH client and server
...tions, addr, port, 0);
+
+#ifdef USE_SCTP
+ if (options->listen_via_sctp)
+ add_one_listen_addr_proto(options, addr, port, IPPROTO_SCTP);
+#endif
+}
+
+static void
+add_one_listen_addr_proto(ServerOptions *options, char *addr, int port, int proto)
+{
struct addrinfo hints, *ai, *aitop;
char strport[NI_MAXSERV];
int gaierr;
@@ -551,6 +573,7 @@ add_one_listen_addr(ServerOptions *options, char *addr, int port)
hints.ai_family = options->address_family;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = (addr == NULL) ? AI_PASSIVE : 0;
+ hints.ai_protocol = proto;
snprintf(strport, si...
2001 Dec 05
1
DISPLAY=localhost
...r the DISPLAY variable, or -1 if
+ * an error occurs.
*/
-char *
-x11_create_display_inet(int screen_number, int x11_display_offset)
+int
+x11_create_display_inet(int x11_display_offset, int gateway_ports)
{
int display_number, sock;
u_short port;
struct addrinfo hints, *ai, *aitop;
char strport[NI_MAXSERV];
int gaierr, n, num_socks = 0, socks[NUM_SOCKS];
- char display[512];
- char hostname[MAXHOSTNAMELEN];
for (display_number = x11_display_offset;
display_number < MAX_DISPLAYS;
@@ -2416,12 +2414,12 @@
port = 6000 + display_number;
memset(&hints, 0, sizeof(hints))...
2004 Aug 05
1
LocalForward and RemoteForward bind patch
...ypedef struct {
+ char *listen_host; /* Address to listen 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_sockt...
2001 Jun 17
0
getnameinfo failed
...Executing: program /usr/local/bin/ssh host 207.224.119.73, user user,
command scp -v -f openssh-2.3.0p1.tar
ssh_connect: getnameinfo failed
I get that 3 times and then it gives up.
I've changed ssh_connect as follows:
if (getnameinfo(ai->ai_addr,ai->ai_addrlen,
ntop, sizeof(ntop), strport,sizeof(strport),
NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
error("ssh_connect: getnameinfo failed");
*** commented out next line
continue;
and now after the getnameinfo failed message it continues ...
The authenticity of host '207.224.119.73' can't be established....