Skip to main content
May 27, 2022
Question

SSH key using a manual username

  • May 27, 2022
  • 3 replies
  • 242 views

I have a .ssh/config file that defines my hosts that I connect to via ssh. When I put the 1password ssh key line in the config file, when I try to connect to one of my hosts, it ignores my configured username and instead uses my mac username. If I comment out the 1password integration section, it goes back to using my configured username in the config file.....

Is there any plan on allowing custom users?


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided

3 replies

XIII
May 27, 2022

Usernames are not part of SSH keys and you should already be able to specify a user in your SSH config file (I already do that):


Host pi
HostName pi.home.lan
User lagreca

(example: use user "lagreca" when logging in to "pi.home.lan" using "ssh pi")

Jack_P_1P
1Password Employee
May 27, 2022

Hi @lagreca:

Thanks for reaching out about this. By any chance, do you have any additional settings configured by Host *?

I just did a quick test with my config looking like this:
```
Host github.com
User git

Host *
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
```

With this I was able to run ssh -T github.com, and successfully use my SSH key from the IdentityAgent configuration line, without it affecting the User line specific to Host github.com.

Let me know!

Jack

lagrecaAuthor
May 29, 2022

Not sure what happened, but ssh is now using the user specified in my config file....... Must have been some weird glitch, that was probably not caused by 1password.