@@ -11,8 +11,7 @@ import { UpdateHttpProvider } from "./app/update"
1111import { VscodeHttpProvider } from "./app/vscode"
1212import { Args , optionDescriptions , parse } from "./cli"
1313import { 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"
1615import { ipcMain , wrap } from "./wrapper"
1716
1817process . on ( "uncaughtException" , ( error ) => {
@@ -101,32 +100,6 @@ const main = async (args: Args): Promise<void> => {
101100
102101 logger . info ( `Automatic updates are ${ update . enabled ? "enabled" : "disabled" } ` )
103102
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-
130103 if ( serverAddress && ! options . socket && args . open ) {
131104 // The web socket doesn't seem to work if browsing with 0.0.0.0.
132105 const openAddress = serverAddress . replace ( / : \/ \/ 0 .0 .0 .0 / , "://localhost" )
0 commit comments