From 792a63e945f5e0c39359f5bbc4d9c42e8fdaf7e1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 20 Jan 2026 22:25:04 +0000 Subject: [PATCH 1/8] Update SSH examples to include root@ prefix - Remove redundant examples without user prefix from ssh.ts help text - Add root@ prefix to all remaining SSH examples in ssh.ts and index.ts - Ensures consistency with documentation and reduces user confusion Co-authored-by: danieltaox --- src/lib/nodes/index.ts | 4 ++-- src/lib/nodes/ssh.ts | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/lib/nodes/index.ts b/src/lib/nodes/index.ts index 576ab6bc..9dcfd76e 100644 --- a/src/lib/nodes/index.ts +++ b/src/lib/nodes/index.ts @@ -71,13 +71,13 @@ $ sf nodes set my-node-name --max-price 12.50 $ sf nodes extend my-node-name --duration 3600 --max-price 12.50 \x1b[2m# SSH into a node's current VM\x1b[0m -$ sf nodes ssh my-node-name +$ sf nodes ssh root@my-node-name \x1b[2m# View logs from a node's current VM\x1b[0m $ sf nodes logs my-node-name \x1b[2m# SSH into a specific VM\x1b[0m -$ sf nodes ssh user@vm_xxxxxxxxxxxxxxxxxxxxx +$ sf nodes ssh root@vm_xxxxxxxxxxxxxxxxxxxxx \x1b[2m# View logs from a specific VM\x1b[0m $ sf nodes logs -i vm_xxxxxxxxxxxxxxxxxxxxx diff --git a/src/lib/nodes/ssh.ts b/src/lib/nodes/ssh.ts index f5ffc2a9..086ad276 100644 --- a/src/lib/nodes/ssh.ts +++ b/src/lib/nodes/ssh.ts @@ -36,16 +36,10 @@ const ssh = new Command("ssh") Examples: \x1b[2m# SSH into a node's current VM\x1b[0m - $ sf nodes ssh my-node + $ sf nodes ssh root@my-node - \x1b[2m# SSH with a specific username\x1b[0m - $ sf nodes ssh jenson@my-node - - \x1b[2m# SSH directly to a VM ID\x1b[0m - $ sf nodes ssh vm_xxxxxxxxxxxxxxxxxxxxx - - \x1b[2m# SSH with username to a VM ID\x1b[0m - $ sf nodes ssh huang@vm_xxxxxxxxxxxxxxxxxxxxx + \x1b[2m# SSH with a specific username to a VM ID\x1b[0m + $ sf nodes ssh root@vm_xxxxxxxxxxxxxxxxxxxxx `, ) .action(async (destination, options) => { From 8f6497e50ccca7fb8086e70c6a3ba76c18b698b8 Mon Sep 17 00:00:00 2001 From: Daniel Tao Date: Tue, 20 Jan 2026 17:43:20 -0500 Subject: [PATCH 2/8] chore: Change SSH command username from 'root' to 'jenson' --- src/lib/nodes/ssh.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/nodes/ssh.ts b/src/lib/nodes/ssh.ts index 086ad276..317c3ccc 100644 --- a/src/lib/nodes/ssh.ts +++ b/src/lib/nodes/ssh.ts @@ -39,7 +39,7 @@ Examples: $ sf nodes ssh root@my-node \x1b[2m# SSH with a specific username to a VM ID\x1b[0m - $ sf nodes ssh root@vm_xxxxxxxxxxxxxxxxxxxxx + $ sf nodes ssh jenson@vm_xxxxxxxxxxxxxxxxxxxxx `, ) .action(async (destination, options) => { From 9a2b75ac0be67aeda423f61e1b0a56649b39ae3f Mon Sep 17 00:00:00 2001 From: Daniel Tao Date: Tue, 20 Jan 2026 17:44:32 -0500 Subject: [PATCH 3/8] chore: Update SSH command examples in ssh.ts --- src/lib/nodes/ssh.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/nodes/ssh.ts b/src/lib/nodes/ssh.ts index 317c3ccc..8a174ab6 100644 --- a/src/lib/nodes/ssh.ts +++ b/src/lib/nodes/ssh.ts @@ -38,8 +38,11 @@ Examples: \x1b[2m# SSH into a node's current VM\x1b[0m $ sf nodes ssh root@my-node - \x1b[2m# SSH with a specific username to a VM ID\x1b[0m - $ sf nodes ssh jenson@vm_xxxxxxxxxxxxxxxxxxxxx + \x1b[2m# SSH with a specific username\x1b[0m + $ sf nodes ssh jenson@my-node + + \x1b[2m# SSH directly to a VM ID\x1b[0m + $ sf nodes ssh root@vm_xxxxxxxxxxxxxxxxxxxxx `, ) .action(async (destination, options) => { From 0eca1256dddb28688f7de55ae2871b1f36010ac0 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 20 Jan 2026 23:21:08 +0000 Subject: [PATCH 4/8] Replace USERNAME placeholder with root in SSH examples - Update argument descriptions to use root@HOST and root@VM_ID - Update vm list example output to show root@VM_ID - Ensures consistency across all SSH command documentation Co-authored-by: danieltaox --- src/lib/nodes/ssh.ts | 2 +- src/lib/vm/list.ts | 2 +- src/lib/vm/ssh.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/nodes/ssh.ts b/src/lib/nodes/ssh.ts index 8a174ab6..cf8bbd6a 100644 --- a/src/lib/nodes/ssh.ts +++ b/src/lib/nodes/ssh.ts @@ -27,7 +27,7 @@ const ssh = new Command("ssh") .addOption(jsonOption) .argument( "", - "USERNAME@HOST The (optional) username, and node name/ID or VM ID to SSH into", + "root@HOST The (optional) username, and node name/ID or VM ID to SSH into", ) .allowExcessArguments(false) .addHelpText( diff --git a/src/lib/vm/list.ts b/src/lib/vm/list.ts index 7926adb7..f0431be0 100644 --- a/src/lib/vm/list.ts +++ b/src/lib/vm/list.ts @@ -144,7 +144,7 @@ You can use ${ console.log(table.toString()); console.log(`\n${gray("Use VM IDs to access and replace VMs.")}\n`); console.log(gray("Examples:")); - console.log(` sf vm ssh ${cyan(`USERNAME@${exampleId}`)}`); + console.log(` sf vm ssh ${cyan(`root@${exampleId}`)}`); console.log(` sf vm logs -i ${cyan(exampleId)} -f`); console.log(` sf vm replace -i ${cyan(exampleId)}`); }); diff --git a/src/lib/vm/ssh.ts b/src/lib/vm/ssh.ts index bc0fe3d8..f8b3424c 100644 --- a/src/lib/vm/ssh.ts +++ b/src/lib/vm/ssh.ts @@ -21,7 +21,7 @@ export function registerSsh(program: Command) { ) .argument( "", - "USERNAME@VM_ID The (optional) username, and VM id to SSH into.", + "root@VM_ID The (optional) username, and VM id to SSH into.", ) .allowExcessArguments(false) .action(async (destination, options) => { From 08fc962e36a3b2bd73ec011724864d9f937e0603 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 20 Jan 2026 23:57:56 +0000 Subject: [PATCH 5/8] Use [user@]hostname format in argument descriptions - Change argument descriptions to use [user@]hostname format following SSH man page conventions - Keep root@ in actual examples (specific usage) - Aligns with standard SSH documentation patterns Co-authored-by: danieltaox --- src/lib/nodes/ssh.ts | 2 +- src/lib/vm/ssh.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/nodes/ssh.ts b/src/lib/nodes/ssh.ts index cf8bbd6a..56ef4870 100644 --- a/src/lib/nodes/ssh.ts +++ b/src/lib/nodes/ssh.ts @@ -27,7 +27,7 @@ const ssh = new Command("ssh") .addOption(jsonOption) .argument( "", - "root@HOST The (optional) username, and node name/ID or VM ID to SSH into", + "[user@]hostname - Node name/ID or VM ID to SSH into", ) .allowExcessArguments(false) .addHelpText( diff --git a/src/lib/vm/ssh.ts b/src/lib/vm/ssh.ts index f8b3424c..03bc6ef6 100644 --- a/src/lib/vm/ssh.ts +++ b/src/lib/vm/ssh.ts @@ -21,7 +21,7 @@ export function registerSsh(program: Command) { ) .argument( "", - "root@VM_ID The (optional) username, and VM id to SSH into.", + "[user@]vm_id - VM ID to SSH into", ) .allowExcessArguments(false) .action(async (destination, options) => { From 91a4498435c1588bdad908e1542d6fc181ec0d3e Mon Sep 17 00:00:00 2001 From: Daniel Tao Date: Tue, 20 Jan 2026 19:00:59 -0500 Subject: [PATCH 6/8] chore: Improve argument description for SSH command --- src/lib/vm/ssh.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/vm/ssh.ts b/src/lib/vm/ssh.ts index 03bc6ef6..6f0d1fcf 100644 --- a/src/lib/vm/ssh.ts +++ b/src/lib/vm/ssh.ts @@ -21,7 +21,7 @@ export function registerSsh(program: Command) { ) .argument( "", - "[user@]vm_id - VM ID to SSH into", + "[user@]vm_id - The (optional) username, and VM id to SSH into.", ) .allowExcessArguments(false) .action(async (destination, options) => { From e735218b57a5cb2f1d642f85324b77259dc8890e Mon Sep 17 00:00:00 2001 From: Daniel Tao Date: Tue, 20 Jan 2026 19:01:37 -0500 Subject: [PATCH 7/8] chore: Clarify SSH destination argument description --- src/lib/nodes/ssh.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/nodes/ssh.ts b/src/lib/nodes/ssh.ts index 56ef4870..dde39a55 100644 --- a/src/lib/nodes/ssh.ts +++ b/src/lib/nodes/ssh.ts @@ -27,7 +27,7 @@ const ssh = new Command("ssh") .addOption(jsonOption) .argument( "", - "[user@]hostname - Node name/ID or VM ID to SSH into", + "[user@]hostname - The (optional) username, and node name/ID or VM ID to SSH into", ) .allowExcessArguments(false) .addHelpText( From fcc4e0796087995a5b4f33dd4fb6506aed9d23fd Mon Sep 17 00:00:00 2001 From: Daniel Tao Date: Tue, 20 Jan 2026 16:32:35 -0800 Subject: [PATCH 8/8] chore: final help text/copy changes --- src/lib/nodes/ssh.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/nodes/ssh.ts b/src/lib/nodes/ssh.ts index dde39a55..c781ee45 100644 --- a/src/lib/nodes/ssh.ts +++ b/src/lib/nodes/ssh.ts @@ -16,7 +16,12 @@ import { getApiUrl } from "../../helpers/urls.ts"; import { getAuthToken } from "../../helpers/config.ts"; const ssh = new Command("ssh") - .description("SSH into a VM on a node") + .description(`SSH into a VM on a node. + +Runs \`ssh\` with host keys from the API, forgoing the need to manually accept keys on first connect. +Keys are fetched asynchronously from the VM's SSH server and may take a moment to populate. + +Standard \`ssh\` behavior applies (e.g. defaults to your current username).`) .showHelpAfterError() .option("-q, --quiet", "Quiet mode", false) .option( @@ -27,8 +32,9 @@ const ssh = new Command("ssh") .addOption(jsonOption) .argument( "", - "[user@]hostname - The (optional) username, and node name/ID or VM ID to SSH into", + "Node name, Node ID, or VM ID to SSH into.\nFollows \`ssh\` behavior (i.e. root@node or jenson@node).", ) + .usage("[options] [user@]") .allowExcessArguments(false) .addHelpText( "after",