Fossil SCM

Change the default ssh command to just be "ssh" and then unequivocally add "-e none" to each ssh-command (default or overridden) as mentioned in [forum:667d59587b90c4c6 | forum post 667d59587b90c4c6]. It's arguable that if ssh-command has been specified that no modifications should be done to it at all. In which case this commit should be backed out and the default command should be made to include "-T" as well.

andybradford 2024-11-23 01:17 mistake
Commit b537eeef058e96697372e1148284974057de3b1ae65706e6d5bfea3716d64845
1 file changed +2 -2
--- src/http_transport.c
+++ src/http_transport.c
@@ -95,11 +95,11 @@
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 -e none";
100
+static const char zDefaultSshCmd[] = "ssh";
101101
#endif
102102
103103
/*
104104
** Initialize a Blob to the name of the configured SSH command.
105105
*/
@@ -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, " -T --"); /* End of switches */
131
+ blob_appendf(&zCmd, " -e none -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,11 +95,11 @@
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 */
@@ -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
--- src/http_transport.c
+++ src/http_transport.c
@@ -95,11 +95,11 @@
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 */
@@ -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

Keyboard Shortcuts

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