On wsl(ubuntu), I can do scp somefile ubuntu:somepath
, and use tab completion for the somepath
, as I use keys to ssh.
But I cant do this in reverse. On remote ubuntu I do scp somefile wsl:
, and then press tab, it will show
-bash: warning: command substitution: ignored null byte in input
.
Config on remote ubuntu for host wsl is just using windows ip and windows username. key is added to C:\Users\username\.ssh\authorized_keys
and I changed default shell to wsl in windows, using this microsoft guide. That registry key is now C:\Windows\System\wsl.exe
. Plus, I can ssh into wsl from ubuntu without password.
Although I can go to wsl and do scp ubuntu:somefile somepath
, but it's annoying to open another shell just for a command and then forget to close it.
scp
completion requires the agent to be able to communicate with the Linux end of things. I think that configuring ssh as I suggest in this answer will allow the "full chain" communication needed. But again, I haven't confirmed yet.