@@ -11,8 +11,7 @@ import { UpdateHttpProvider } from "./app/update"
11
11
import { VscodeHttpProvider } from "./app/vscode"
12
12
import { Args , optionDescriptions , parse } from "./cli"
13
13
import { AuthType , HttpServer , HttpServerOptions } from "./http"
14
- import { SshProvider } from "./ssh/server"
15
- import { generateCertificate , generatePassword , generateSshHostKey , hash , open } from "./util"
14
+ import { generateCertificate , generatePassword , hash , open } from "./util"
16
15
import { ipcMain , wrap } from "./wrapper"
17
16
18
17
process . on ( "uncaughtException" , ( error ) => {
@@ -101,32 +100,6 @@ const main = async (args: Args): Promise<void> => {
101
100
102
101
logger . info ( `Automatic updates are ${ update . enabled ? "enabled" : "disabled" } ` )
103
102
104
- let sshHostKey = args [ "ssh-host-key" ]
105
- if ( ! args [ "disable-ssh" ] && ! sshHostKey ) {
106
- try {
107
- sshHostKey = await generateSshHostKey ( )
108
- } catch ( error ) {
109
- logger . error ( "Unable to start SSH server" , field ( "error" , error . message ) )
110
- }
111
- }
112
-
113
- let sshPort : number | undefined
114
- if ( ! args [ "disable-ssh" ] && sshHostKey ) {
115
- const sshProvider = httpServer . registerHttpProvider ( "/ssh" , SshProvider , sshHostKey )
116
- try {
117
- sshPort = await sshProvider . listen ( )
118
- } catch ( error ) {
119
- logger . warn ( `SSH server: ${ error . message } ` )
120
- }
121
- }
122
-
123
- if ( typeof sshPort !== "undefined" ) {
124
- logger . info ( `SSH server listening on localhost:${ sshPort } ` )
125
- logger . info ( " - To disable use `--disable-ssh`" )
126
- } else {
127
- logger . info ( "SSH server disabled" )
128
- }
129
-
130
103
if ( serverAddress && ! options . socket && args . open ) {
131
104
// The web socket doesn't seem to work if browsing with 0.0.0.0.
132
105
const openAddress = serverAddress . replace ( / : \/ \/ 0 .0 .0 .0 / , "://localhost" )
0 commit comments