Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default username does not work #283

Open
sungkim11 opened this issue Jan 18, 2024 · 7 comments
Open

Default username does not work #283

sungkim11 opened this issue Jan 18, 2024 · 7 comments

Comments

@sungkim11
Copy link

I entered the default username in the setting.

It ignores default username and it uses some other username.

@Jniklas2
Copy link

I have the same issue on windows 11 with vscode 1.95.2 and the tailscale extension v1.0.0. It always uses the username from windows and ignores that setting

@jylin
Copy link

jylin commented Feb 12, 2025

The default username (set from "Change SSH username") seems to work for opening a terminal but not for "Attach VS Code". Could this be fixed?

Additional feature request: be able to specify per-host default usernames through settings. Right now, it's not clear where the default username is being saved, but it'd be nice if it were in settings so that it can be synced to the cloud too.

@Jniklas2
Copy link

Jniklas2 commented Feb 13, 2025

Right now, it's not clear where the default username is being saved

It's saved in the ssh config file in %HOMEPATH%\.ssh\config on windows and in ~\.ssh\config on most linux distributions.

@jylin
Copy link

jylin commented Feb 13, 2025

I configure a default username in the VSCode plugin, and I don't see anything being set in .ssh/config. It still manages to use that default username for the "Terminal" command.

@Jniklas2
Copy link

Jniklas2 commented Feb 17, 2025

I configure a default username in the VSCode plugin, and I don't see anything being set in .ssh/config. It still manages to use that default username for the "Terminal" command.

Ah, I thought you meant how it's for saved connections.

The default username is save in
%appdata%\Code\User\settings.json on windows and
~/.config/Code/User/settings.json on linux. The key is tailscale.ssh.defaultUsername. That file is automatically synced, if you enable the config sync (but you decide to disable the sync for specific options).

But it sadly still ignores that setting :(

@jylin
Copy link

jylin commented Feb 17, 2025

That's a global username setting, and it works fine for me, but from the UI you can set a specific username per host, which works too but I don't know where that setting is saved (it's not in settings.json).

@Jniklas2
Copy link

That's saved in the ssh config files, like I told you before:

Right now, it's not clear where the default username is being saved

It's saved in the ssh config file in %HOMEPATH%\.ssh\config on windows and in ~\.ssh\config on most linux distributions.

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

No branches or pull requests

3 participants