Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions apps/web/src/components/desktop/SshPasswordPromptDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ function formatRemainingSeconds(seconds: number): string {
}

function getPromptErrorMessage(error: unknown): string {
const message = error instanceof Error ? error.message : "SSH password prompt failed.";
const message = error instanceof Error ? error.message : "SSH verification prompt failed.";
return message.includes("expired") || message.includes("no longer pending")
? "This SSH password prompt expired. Try connecting again."
? "This SSH verification prompt expired. Try connecting again."
: message;
}

Expand Down Expand Up @@ -104,7 +104,7 @@ function ActiveSshPasswordPrompt({
const remainingLabel =
remainingSeconds === null ? null : formatRemainingSeconds(remainingSeconds);
const visibleResponseError = isExpired
? "This SSH password prompt expired. Try connecting again."
? "This SSH verification prompt expired. Try connecting again."
: responseError;

const respond = async (nextPassword: string | null) => {
Expand All @@ -114,7 +114,7 @@ function ActiveSshPasswordPrompt({

const requestId = request.requestId;
if (nextPassword !== null && isExpired) {
setResponseError("This SSH password prompt expired. Try connecting again.");
setResponseError("This SSH verification prompt expired. Try connecting again.");
return;
}

Expand Down Expand Up @@ -158,10 +158,11 @@ function ActiveSshPasswordPrompt({
>
<DialogPopup className="max-w-md" showCloseButton={false}>
<DialogHeader>
<DialogTitle>SSH Password Required</DialogTitle>
<DialogTitle>SSH verification required</DialogTitle>
<DialogDescription>
T3 needs your SSH password to connect to <code>{target}</code>. The password is passed
to the local SSH process for this connection attempt and is not saved by T3 Code.
Enter the password or verification code required by <code>{target}</code>. T3 Code
passes your response to the local SSH process and keeps it in memory to reuse for this
host. T3 Code does not write it to disk.
</DialogDescription>
</DialogHeader>
<DialogPanel scrollFade={false}>
Expand Down Expand Up @@ -202,7 +203,8 @@ function ActiveSshPasswordPrompt({
<p className="text-sm text-destructive">{visibleResponseError}</p>
) : (
<p className="text-sm text-muted-foreground">
Use SSH keys to avoid repeated password prompts on new SSH sessions.
SSH keys may replace a password, but your server can still require a verification
code.
</p>
)}
</form>
Expand Down
2 changes: 1 addition & 1 deletion packages/ssh/src/tunnel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ const makeSshEnvironmentManager = Effect.fn("ssh/tunnel.SshEnvironmentManager.ma
attempt,
destination: target.alias.trim() || target.hostname.trim(),
username: target.username,
prompt: `Enter the SSH password for ${hostSpec}.`,
prompt: `Enter the SSH password or verification code for ${hostSpec}.`,
});
if (password === null) {
yield* Effect.logWarning("ssh.auth.passwordPrompt.cancelled", {
Expand Down
Loading