I have an app running with an SQLite db on a volume. Now I am trying to connect to it over ssh to manage my db with TablePlus.
My idea was to make the app locally accessible through wireguard and then use ssh to connect to it. Connecting via fly ssh console works well, but I can not do that with TablePlus, so I need to be able to access it with ssh directly.
My steps so far have been:
Create a wireguard config (fly wireguard create)
Load the generated config with wireguard
Check if I can ping it with ping6 <app-name>.internal
Create ssh keys with fly ssh issue --agent
And now I am stuck. TablePlus wants the private key, but I have no idea where to get that. It has not been exposed when issuing ssh credentials.
I wanted to see if I can connect via ssh without using TablePlus with ssh root@<app-name>.internal, which errors with
exec: "\nexport": executable file not found in $PATH
Connection to <app-name>.internal closed by remote host.
Connection to <app-name>.internal closed.
My knowledge on ssh keys and server stuff is pretty limited, so I might have misunderstood how all that works.
Yes, I have generated the keys the same way and tried to import the private key. Since that did not work, i have tried to take the same route, that you took (ssh <app-name>.internal), if I do that, I also get Permission denied (publickey), because it uses my local user name as the default one.
in the docs if found:
Unix usernames the SSH cert can authenticate as (default [root,fly])
So I have tried ssh root@<app-name>.internal, which seems to pass the authentication but fails with:
exec: "\nexport": executable file not found in $PATH
Connection to <app-name>.internal closed by remote host.
Connection to <app-name>.internal closed.
Do you get the same error, or does that work for you?
Thank you so much! When you said it was working, I was thinking it might be a problem with my terminal, so I tried a different terminal and it worked just fine.
The other thing that I did is not importing the private key in TablePlus. By checking the “Use ssh” checkbox but leaving the field empty it uses the ssh config and seems to read from the ssh-agent. So as long as you have valid ssh keys in your agent you seem to be able to connect.
For some who tries to do the same, here is my config: