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.
scpcompletion 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. – NotTheDr01ds Feb 19 '22 at 00:12-Jsuccessfully, then the~/.ssh/configwithProxyJumpisn't strictly necessary, just a nice-to-have to suppress the warnings you'll get in the future if you attempt a differentlocalhostconnection on a different port. -- Is thescpcompletion working for you now? – NotTheDr01ds Feb 19 '22 at 16:46ProxyJumpneed only one22port open. So I will give it a try. – tothedistance Feb 22 '22 at 01:44