Displaying 20 results from an estimated 42 matches for "proxy_command".
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
2003 Apr 02
0
[Bug 528] ProxyCommand none breaks ssh
...in ssh_config, and i even see special provisions for that keyword in the
source code, but it doesn't work. When i set it, i get the errors:
/bin/sh: line 1: exec: none: not found
ssh_exchange_identification: Connection closed by remote host
I checked this, and this results from passing options.proxy_command = "none" to
ssh_connect. Looks like You might need the following patch:
--- sshconnect.c.orig 2003-04-02 06:51:28.000000000 +0200
+++ sshconnect.c 2003-04-02 06:53:42.000000000 +0200
@@ -258,7 +258,8 @@
port = SSH_DEFAULT_PORT;
}
/* If a p...
2007 Jan 16
0
patch to enable ssh use sock fd 3,4
...5p1/sshconnect.c 2006-10-23 20:02:24.000000000 +0300
+++ openssh-4.5p1-ssh-socket/sshconnect.c 2007-01-16
14:06:31.000000000 +0200
@@ -310,8 +310,14 @@
debug2("ssh_connect: needpriv %d", needpriv);
/* If a proxy command is given, connect using it. */
- if (proxy_command != NULL)
- return ssh_proxy_connect(host, port, proxy_command);
+ if (proxy_command != NULL) {
+ if(strcmp(proxy_command,":socket:"))
+ return ssh_proxy_connect(host, port, proxy_command);
+ else {
+ packet_set_connection(3, 4);
+ retu...
2003 Apr 14
1
OpenSSH 3.6.1p1 "Proxy-None" patch
...fine INET6_ADDRSTRLEN 46
#endif
+ #ifndef PROXY_NONE
+ #define PROXY_NONE "None\n"
+ #endif
+
static int show_other_keys(const char *, Key *);
/*
***************
*** 258,264 ****
port = SSH_DEFAULT_PORT;
}
/* If a proxy command is given, connect using it. */
! if (proxy_command != NULL)
return ssh_proxy_connect(host, port, proxy_command);
/* No proxy command. */
--- 262,268 ----
port = SSH_DEFAULT_PORT;
}
/* If a proxy command is given, connect using it. */
! if (proxy_command != NULL && strcmp(proxy_command, PROXY_NONE))
return ssh_proxy...
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
2002 Sep 30
2
[PATCH] Allow "ProxyCommand none" in ssh_config
...retrieving revision 1.76
diff -u -r1.76 readconf.c
--- readconf.c 9 Jul 2002 14:06:40 -0000 1.76
+++ readconf.c 30 Sep 2002 19:00:22 -0000
@@ -724,6 +724,19 @@
if (bad_options > 0)
fatal("%s: terminating, %d bad configuration options",
filename, bad_options);
+
+ /*
+ * If proxy_command is set to 'none' (actually ' none' due to the way
+ * the code in process_config_line works), unset it. This allows for
+ * excluding certain hosts from using the proxy command while having it
+ * enabled by default (i.e. for 'Host *')
+ */
+ if (options->proxy_comman...
2000 Nov 14
1
[PATCH] Added option 'RetryDelay'
...es the seconds
+ * to wait between connection attempts.
*/
int
ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
- u_short port, int connection_attempts,
+ u_short port, int connection_attempts, int retry_delay,
int anonymous, uid_t original_real_uid,
const char *proxy_command);
diff -u --recursive openssh-2.3.0p1/sshconnect.c openssh-2.3.0p1-new/sshconnect.c
--- openssh-2.3.0p1/sshconnect.c Sat Sep 23 02:15:57 2000
+++ openssh-2.3.0p1-new/sshconnect.c Tue Nov 14 07:53:06 2000
@@ -180,14 +180,14 @@
* If port is 0, the default port will be used. If anonymous is zero,...
2005 Jun 12
2
%h,%p,%u expansion for ControlPath
...= tolower(*p);
}
+ /* Get default port if port has not been set. */
+ if (options.port == 0) {
+ struct servent *sp;
+
+ sp = getservbyname(SSH_SERVICE_NAME, "tcp");
+ if (sp)
+ options.port = ntohs(sp->s_port);
+ else
+ options.port = SSH_DEFAULT_PORT;
+ }
+
if (options.proxy_command != NULL &&
strcmp(options.proxy_command, "none") == 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....
2003 Jun 16
2
[Bug 596] "ProxyCommand none" doesn't work
...c0 "ProxyCommand none\n"
(gdb)
The newline at the end gets copied through into the options structure:
(gdb) dis 1
(gdb) break ssh.c:604
Breakpoint 2 at 0x804bece: file ssh.c, line 604.
(gdb) c
Continuing.
Breakpoint 2, main (ac=0, av=0xbfffbdfc) at ssh.c:604
604 if (options.proxy_command != NULL &&
(gdb) print options.proxy_command
$2 = 0x8085da0 "none\n"
(gdb)
This means that the following code doesn't do what it's supposed to do:
if (options.proxy_command != NULL &&
strcmp(options.proxy_command, "none") == 0)
options.proxy_com...
2010 Nov 28
2
[PATCH] Use canonical hostname for DNS SSHFP lookup
...-26 02:53:06.000000000 +0100
+++ openssh-sshfp/roaming_client.c 2010-11-28 09:49:06.626052834 +0100
@@ -263,7 +263,7 @@
if (ssh_connect(host, &hostaddr, options.port,
options.address_family, 1, &timeout_ms,
options.tcp_keep_alive, options.use_privileged_port,
- options.proxy_command) == 0 && roaming_resume() == 0) {
+ options.proxy_command, NULL) == 0 && roaming_resume() == 0) {
packet_restore_state();
reenter_guard = 0;
fprintf(stderr, "[connection resumed]\n");
diff -ur openssh/ssh.c openssh-sshfp/ssh.c
--- openssh/ssh.c 2010-11-20...
2002 Jul 17
2
[Patch] SSH through HTTP proxy using CONNECT
...&options->proxy_server;
+ goto parse_string;
+
+ case oProxyPort:
+ intptr = &options->proxy_port;
+ goto parse_int;
+
case oPort:
intptr = &options->port;
parse_int:
@@ -765,6 +776,8 @@
options->hostname = NULL;
options->host_key_alias = NULL;
options->proxy_command = NULL;
+ options->proxy_server = NULL;
+ options->proxy_port = -1;
options->user = NULL;
options->escape_char = -1;
options->system_hostfile = NULL;
@@ -894,6 +907,7 @@
if (options->log_level == (LogLevel) - 1)
options->log_level = SYSLOG_LEVEL_INFO;
/* options-&g...
2004 Aug 26
2
OpenSSH PATCH: OpenCommand and CloseCommand
...+ const char *run_command);
+
+int
ssh_connect(const char *, struct sockaddr_storage *, u_short, int, int,
int, const char *);
Index: ssh.c
--- openssh-3.8p1.orig/ssh.c (.../.transvn:beginning) (revision 25)
+++ openssh-3.8p1/ssh.c (revision 25)
@@ -606,6 +606,11 @@
strcmp(options.proxy_command, "none") == 0)
options.proxy_command = NULL;
+ /* Execute open command, if set */
+ if (options.open_command != NULL &&
+ strcmp(options.open_command, "none") != 0)
+ ssh_run_command("open", host, options.port, options.open_command);
+
/* Open a con...
2001 Aug 15
1
ProxyCommand broken in SNAP-20010814
..., one line was removed from the handling of
ProxyCommand in readconf.c. As a result, ssh crashes on strlen(string)
when it parses this option.
--- readconf.c:X Mon Aug 6 23:35:52 2001
+++ readconf.c Wed Aug 15 16:11:44 2001
@@ -475,6 +475,7 @@
case oProxyCommand:
charptr = &options->proxy_command;
+ string = xstrdup("");
while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
string = xrealloc(string, strlen(string) + strlen(arg) + 2); strcat(string, " ");
--Pavel Kankovsky aka Peak [ Boycott Microsoft--http://www.vcnet.com/bms ]
"Res...
2013 Oct 23
1
ProxyCommand brokent in recent snapshots
...g revision 1.386
diff -u -r1.386 ssh.c
--- ssh.c 23 Oct 2013 05:31:11 -0000 1.386
+++ ssh.c 23 Oct 2013 18:42:01 -0000
@@ -915,7 +915,7 @@
* resolve the bare hostname name using the system resolver's usual
* search rules.
*/
- if (addrs == NULL) {
+ if (addrs == NULL && options.proxy_command == NULL) {
if ((addrs = resolve_host(host, options.port, 1,
cname, sizeof(cname))) == NULL)
cleanup_exit(255); /* resolve_host logs the error */
--
Iain Morgan
2000 Jun 06
0
connection timeout
...ls
* packet_set_connection for the connection.
*/
int
ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
- u_short port, int connection_attempts,
+ u_short port, int connection_attempts, int connection_timeout,
int anonymous, uid_t original_real_uid,
const char *proxy_command);
diff -Naur openssh-2.1.0p3/sshconnect.c openssh-2.1.0p3-new/sshconnect.c
--- openssh-2.1.0p3/sshconnect.c Thu May 18 07:03:23 2000
+++ openssh-2.1.0p3-new/sshconnect.c Mon Jun 5 19:32:56 2000
@@ -175,14 +175,16 @@
* If port is 0, the default port will be used. If anonymous is zero,
* a pr...
2002 May 22
0
[PATCH] connect() timeout
...@@
/* Open a connection to the remote host. */
cerr = ssh_connect(host, &hostaddr, options.port, IPv4or6,
- options.connection_attempts,
+ options.connection_attempts, options.connection_timeout,
original_effective_uid != 0 || !options.use_privileged_port,
pw, options.proxy_command);
--- openssh-3.2.2p1/sshconnect.c.ORIG Tue Mar 5 19:59:46 2002
+++ openssh-3.2.2p1/sshconnect.c Tue May 21 15:40:06 2002
@@ -222,6 +222,63 @@
return sock;
}
+int
+timeout_connect(int sockfd, const struct sockaddr *serv_addr,
+ socklen_t addrlen, int timeout)
+{
+ fd_set *fdset;
+ struct...
2016 Jul 22
2
SSH crash on OpenBSD (pledge related?)
Hello,
I just ran upon this problem and couldn't find it in bugzilla.
SSH crashes (abort trap) if all of the following conditions are met:
(a) option -f is used (crash happens when going to background),
(b) reverse port forwarding is set up (option -R),
(c) option ExitOnForwardFailure is enabled,
(d) there are no actual port-forwarding failures.
The problem can be reproduced by
2002 Jan 26
5
[PATCH] Connect timeout
...@@
/* Open a connection to the remote host. */
cerr = ssh_connect(host, &hostaddr, options.port, IPv4or6,
- options.connection_attempts,
+ options.connection_attempts, options.connection_timeout,
original_effective_uid != 0 || !options.use_privileged_port,
pw, options.proxy_command);
--- sshconnect.c.OK Wed Oct 10 07:07:45 2001
+++ sshconnect.c Sat Jan 26 21:44:35 2002
@@ -35,6 +35,8 @@
char *client_version_string = NULL;
char *server_version_string = NULL;
+static jmp_buf jmpenv;
+
extern Options options;
extern char *__progname;
@@ -221,6 +223,43 @@
return sock;...
2001 Nov 17
0
[PATCH] Connect timeout
...@@
/* Open a connection to the remote host. */
cerr = ssh_connect(host, &hostaddr, options.port, IPv4or6,
- options.connection_attempts,
+ options.connection_attempts, options.connection_timeout,
original_effective_uid != 0 || !options.use_privileged_port,
pw, options.proxy_command);
--- openssh-3.0.1p1/sshconnect.c.ORIG Sat Nov 17 22:49:09 2001
+++ openssh-3.0.1p1/sshconnect.c Sat Nov 17 23:02:27 2001
@@ -35,6 +35,8 @@
char *client_version_string = NULL;
char *server_version_string = NULL;
+static jmp_buf jmpenv;
+
extern Options options;
extern char *__progname;
@...
2002 Apr 03
1
[PATCH] connect() timeout
...@@
/* Open a connection to the remote host. */
cerr = ssh_connect(host, &hostaddr, options.port, IPv4or6,
- options.connection_attempts,
+ options.connection_attempts, options.connection_timeout,
original_effective_uid != 0 || !options.use_privileged_port,
pw, options.proxy_command);
--- openssh-3.1p1/sshconnect.c.ORIG Tue Mar 5 19:59:46 2002
+++ openssh-3.1p1/sshconnect.c Wed Apr 3 23:33:48 2002
@@ -222,6 +222,64 @@
return sock;
}
+int
+timeout_connect(int sockfd, const struct sockaddr *serv_addr,
+ socklen_t addrlen, int timeout)
+{
+ int rc;
+ fd_set fds;
+
+...