Fossil SCM

This commit had more than I had intended.

andybradford 2024-11-23 01:08 ssh-command-once
Commit 91adccdb7d2dff7ab38771e26c07d4470c36447b024cc21fa13169f52e32eeef
1 file changed +3 -3
--- src/http_transport.c
+++ src/http_transport.c
@@ -95,20 +95,20 @@
9595
** Default SSH command
9696
*/
9797
#if 0 /* was: defined(_WIN32). Windows generally has ssh now. */
9898
static const char zDefaultSshCmd[] = "plink -ssh";
9999
#else
100
-static const char zDefaultSshCmd[] = "ssh";
100
+static const char zDefaultSshCmd[] = "ssh -e none";
101101
#endif
102102
103103
/*
104104
** Initialize a Blob to the name of the configured SSH command.
105105
*/
106106
void transport_ssh_command(Blob *p){
107107
char *zSsh; /* The base SSH command */
108108
zSsh = g.zSshCmd;
109
- if( zSsh==0 || zSsh[0]==0 ){
109
+ if( zSsh==0 && zSsh[0]==0 ){
110110
zSsh = db_get("ssh-command", zDefaultSshCmd);
111111
}
112112
blob_init(p, zSsh, -1);
113113
}
114114
@@ -126,11 +126,11 @@
126126
g.zIpAddr = mprintf("%s", pUrlData->name);
127127
transport_ssh_command(&zCmd);
128128
if( pUrlData->port!=pUrlData->dfltPort && pUrlData->port ){
129129
blob_appendf(&zCmd, " -p %d", pUrlData->port);
130130
}
131
- blob_appendf(&zCmd, " -e none -T --"); /* End of switches */
131
+ blob_appendf(&zCmd, " -T --"); /* End of switches */
132132
if( pUrlData->user && pUrlData->user[0] ){
133133
zHost = mprintf("%s@%s", pUrlData->user, pUrlData->name);
134134
blob_append_escaped_arg(&zCmd, zHost, 0);
135135
fossil_free(zHost);
136136
}else{
137137
--- src/http_transport.c
+++ src/http_transport.c
@@ -95,20 +95,20 @@
95 ** Default SSH command
96 */
97 #if 0 /* was: defined(_WIN32). Windows generally has ssh now. */
98 static const char zDefaultSshCmd[] = "plink -ssh";
99 #else
100 static const char zDefaultSshCmd[] = "ssh";
101 #endif
102
103 /*
104 ** Initialize a Blob to the name of the configured SSH command.
105 */
106 void transport_ssh_command(Blob *p){
107 char *zSsh; /* The base SSH command */
108 zSsh = g.zSshCmd;
109 if( zSsh==0 || zSsh[0]==0 ){
110 zSsh = db_get("ssh-command", zDefaultSshCmd);
111 }
112 blob_init(p, zSsh, -1);
113 }
114
@@ -126,11 +126,11 @@
126 g.zIpAddr = mprintf("%s", pUrlData->name);
127 transport_ssh_command(&zCmd);
128 if( pUrlData->port!=pUrlData->dfltPort && pUrlData->port ){
129 blob_appendf(&zCmd, " -p %d", pUrlData->port);
130 }
131 blob_appendf(&zCmd, " -e none -T --"); /* End of switches */
132 if( pUrlData->user && pUrlData->user[0] ){
133 zHost = mprintf("%s@%s", pUrlData->user, pUrlData->name);
134 blob_append_escaped_arg(&zCmd, zHost, 0);
135 fossil_free(zHost);
136 }else{
137
--- src/http_transport.c
+++ src/http_transport.c
@@ -95,20 +95,20 @@
95 ** Default SSH command
96 */
97 #if 0 /* was: defined(_WIN32). Windows generally has ssh now. */
98 static const char zDefaultSshCmd[] = "plink -ssh";
99 #else
100 static const char zDefaultSshCmd[] = "ssh -e none";
101 #endif
102
103 /*
104 ** Initialize a Blob to the name of the configured SSH command.
105 */
106 void transport_ssh_command(Blob *p){
107 char *zSsh; /* The base SSH command */
108 zSsh = g.zSshCmd;
109 if( zSsh==0 && zSsh[0]==0 ){
110 zSsh = db_get("ssh-command", zDefaultSshCmd);
111 }
112 blob_init(p, zSsh, -1);
113 }
114
@@ -126,11 +126,11 @@
126 g.zIpAddr = mprintf("%s", pUrlData->name);
127 transport_ssh_command(&zCmd);
128 if( pUrlData->port!=pUrlData->dfltPort && pUrlData->port ){
129 blob_appendf(&zCmd, " -p %d", pUrlData->port);
130 }
131 blob_appendf(&zCmd, " -T --"); /* End of switches */
132 if( pUrlData->user && pUrlData->user[0] ){
133 zHost = mprintf("%s@%s", pUrlData->user, pUrlData->name);
134 blob_append_escaped_arg(&zCmd, zHost, 0);
135 fossil_free(zHost);
136 }else{
137

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button