You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jaypipes@winnie:~$ cat /proc/version
Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Oct 5 21:02:42 UTC 2023
jaypipes@winnie:~$ cat demo.sh
#!/bin/bash
sub=<REDACTED>
sshconf=~/.ssh/demo
rg=<REDACTED>
vm=<REDACTED>
rm -rf "$sshconf"
az ssh config --file "$sshconf" --subscription "$sub" --resource-group "$rg" --name "$vm" --resource-type "Microsoft.HybridCompute/machines"
jaypipes@winnie:~$ ./demo.sh
\\wsl.localhost\Ubuntu-22.04\home\jaypipes\.ssh\az_ssh_config\<REDACTED>\id_rsa already exists.
Overwrite (y/n)? y
Unable to save public key to \\\\wsl.localhost\\Ubuntu-22.04\\home\\jaypipes\\.ssh\\az_ssh_config\\<REDACTED>\\id_rsa.pub: No such file or directory
Could not parse public key. Error: Incorrectly formatted public key. Key must be format '<algorithm> <base64_key>'
Expected Behavior
A colleague of mine did the exact same thing and got an SSH configuration file properly written to his $HOME/.ssh directory:
matt@DESKTOP-8UUMQBQ:~$ bash -x ~/bin/jump east setup
<REDACTED>
+ az ssh config --file /home/matt/.ssh/azjump --subscription <REDACTED> --resource-group <REDACTED> --name <REDACTED> --resource-type Microsoft.HybridCompute/machines
/home/matt/.ssh/az_ssh_config/<REDACTED>/id_rsa already exists.
Overwrite (y/n)? y
Generated relay information /home/matt/.ssh/az_ssh_config/<REDACTED>/<REDCATED>-relay_info is valid until 2024-02-28 05:31:44 PM in local time.
Generated SSH certificate /home/matt/.ssh/az_ssh_config/<REDACTED>/id_rsa.pub-aadcert.pub is valid until 2024-02-28 05:31:43 PM in local time.
/home/matt/.ssh/az_ssh_config/<REDACTED> contains sensitive information (id_rsa, id_rsa.pub, id_rsa.pub-aadcert.pub, <REDACTED>-relay_info). Please delete it once you no longer need this config file.
His WSL and OpenSSH (in both Ubuntu and Windows) were the exact same versions.
Actual Behavior
For some reason, unlike my colleague, my WSL environment wants to overwrite some \\\\wsl.localhost file path:
Unable to save public key to \\\\wsl.localhost\\Ubuntu-22.04\\home\\jaypipes\\.ssh\\az_ssh_config\\<REDACTED>\\id_rsa.pub: No such file or directory
Could not parse public key. Error: Incorrectly formatted public key. Key must be format '<algorithm> <base64_key>'
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered:
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
The problem was that the azure-cli had been installed in Windows and WSL was executing that azure-cli Windows binary. I added the following to my .bashrc:
# Remove Windows paths from PATH...export PATH=$(echo $PATH| sed -r 's/:\/mnt[^:]*//g')
and then manually installed azure-cli in WSL and the commands then succeeded.
Windows Version
Microsoft Windows [Version 10.0.22631.3155]
WSL Version
2.0.9.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.133.1-microsoft-standard-WSL2
Distro Version
Ubuntu 22.04.3 LTS
Other Software
PS C:\Users\jaypipes> ssh -V
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
PS C:\Users\jaypipes> wsl --version
WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22631.3155
jaypipes@winnie:~$ cat /proc/version
Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Oct 5 21:02:42 UTC 2023
jaypipes@winnie:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
Repro Steps
Expected Behavior
A colleague of mine did the exact same thing and got an SSH configuration file properly written to his $HOME/.ssh directory:
His WSL and OpenSSH (in both Ubuntu and Windows) were the exact same versions.
Actual Behavior
For some reason, unlike my colleague, my WSL environment wants to overwrite some
\\\\wsl.localhost
file path:Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: