91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
return 0;
}
/*
** Default SSH command
*/
#if 0 /* was: defined(_WIN32). Windows generally has ssh now. */
static const char zDefaultSshCmd[] = "plink -ssh -T";
#else
static const char zDefaultSshCmd[] = "ssh -e none -T";
#endif
/*
** Initialize a Blob to the name of the configured SSH command.
*/
void transport_ssh_command(Blob *p){
char *zSsh; /* The base SSH command */
|
|
|
|
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
return 0;
}
/*
** Default SSH command
*/
#if 0 /* was: defined(_WIN32). Windows generally has ssh now. */
static const char zDefaultSshCmd[] = "plink -ssh";
#else
static const char zDefaultSshCmd[] = "ssh -e none";
#endif
/*
** Initialize a Blob to the name of the configured SSH command.
*/
void transport_ssh_command(Blob *p){
char *zSsh; /* The base SSH command */
|
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
char *zHost; /* The host name to contact */
socket_ssh_resolve_addr(pUrlData);
transport_ssh_command(&zCmd);
if( pUrlData->port!=pUrlData->dfltPort && pUrlData->port ){
blob_appendf(&zCmd, " -p %d", pUrlData->port);
}
blob_appendf(&zCmd, " --"); /* End of switches */
if( pUrlData->user && pUrlData->user[0] ){
zHost = mprintf("%s@%s", pUrlData->user, pUrlData->name);
blob_append_escaped_arg(&zCmd, zHost, 0);
fossil_free(zHost);
}else{
blob_append_escaped_arg(&zCmd, pUrlData->name, 0);
}
|
|
|
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
char *zHost; /* The host name to contact */
socket_ssh_resolve_addr(pUrlData);
transport_ssh_command(&zCmd);
if( pUrlData->port!=pUrlData->dfltPort && pUrlData->port ){
blob_appendf(&zCmd, " -p %d", pUrlData->port);
}
blob_appendf(&zCmd, " -T --"); /* End of switches */
if( pUrlData->user && pUrlData->user[0] ){
zHost = mprintf("%s@%s", pUrlData->user, pUrlData->name);
blob_append_escaped_arg(&zCmd, zHost, 0);
fossil_free(zHost);
}else{
blob_append_escaped_arg(&zCmd, pUrlData->name, 0);
}
|