Skip to content

Add totp support in keyboard-interactive authentication mode#10531

Open
NightWatcher314 wants to merge 4 commits intoEugeny:masterfrom
NightWatcher314:master
Open

Add totp support in keyboard-interactive authentication mode#10531
NightWatcher314 wants to merge 4 commits intoEugeny:masterfrom
NightWatcher314:master

Conversation

@NightWatcher314
Copy link

Summary

Adds Time-based One-time Password (TOTP) support to SSH keyboard-interactive authentication with automatic code generation and smart prompt detection.

Key Features

  • TOTP Integration: Store Base32 TOTP secrets in SSH profiles
  • Auto-fill: Automatically generates and inputs TOTP codes during authentication
  • Smart Detection: Recognizes TOTP prompts (verification code, authenticator, etc.)
  • Real-time UI: Live TOTP display with 30-second countdown timer
  • Seamless Experience: Works alongside existing password authentication

Technical Changes

  • Added TOTPService with RFC 6238 compliant TOTP generation
  • Enhanced KeyboardInteractiveAuthComponent with TOTP lifecycle management
  • Added TOTP secret configuration in SSH profile settings
  • Implemented automatic prompt detection and code refresh

Preview

config

image

auto-fill

image

Copy link
Owner

@Eugeny Eugeny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! Just a few things

@Injectable({ providedIn: 'root' })
export class TOTPService {
/**
* 生成TOTP代码
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please translate all comments

white-space: pre-wrap;
}

.totp-info {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a standard bootstrap alert component here (.alert.alert-success) so that it can respond to theme changes

@NightWatcher314
Copy link
Author

Sure, I will fix these problems.

@bigbeef
Copy link

bigbeef commented Nov 30, 2025

老铁,我急需这个功能

@NightWatcher314
Copy link
Author

老铁,我急需这个功能
好的,我近期再看看怎么加上去。因为 tabby 当时好一段时间没有合我的 pr,所以我后来换到了 kitty,给 kitty 增加了 totp 的功能。

@blablabla-bla2009
Copy link

I really need this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants