diff --git a/ui/commands/ssh.js b/ui/commands/ssh.js index 41555c1..78252d0 100644 --- a/ui/commands/ssh.js +++ b/ui/commands/ssh.js @@ -242,30 +242,6 @@ class SSH { } const initialFieldDef = { - User: { - name: "User", - description: "", - type: "text", - value: "", - example: "guest", - readonly: false, - suggestions(input) { - return []; - }, - verify(d) { - if (d.length <= 0) { - throw new Error("Username must be specified"); - } - - if (d.length > MAX_USERNAME_LEN) { - throw new Error( - "Username must not longer than " + MAX_USERNAME_LEN + " bytes" - ); - } - - return "We'll login as user \"" + d + '"'; - }, - }, Host: { name: "Host", description: "", @@ -300,6 +276,30 @@ const initialFieldDef = { return "Look like " + addr.type + " address"; }, }, + User: { + name: "User", + description: "", + type: "text", + value: "", + example: "guest", + readonly: false, + suggestions(input) { + return []; + }, + verify(d) { + if (d.length <= 0) { + throw new Error("Username must be specified"); + } + + if (d.length > MAX_USERNAME_LEN) { + throw new Error( + "Username must not longer than " + MAX_USERNAME_LEN + " bytes" + ); + } + + return "We'll login as user \"" + d + '"'; + }, + }, Encoding: { name: "Encoding", description: "The character encoding of the server", @@ -766,7 +766,6 @@ class Wizard { command.fieldsWithPreset( initialFieldDef, [ - { name: "User" }, { name: "Host", suggestions(input) { @@ -794,6 +793,7 @@ class Wizard { return sugg; }, }, + { name: "User" }, { name: "Authentication" }, { name: "Encoding" }, { name: "Notice" },