Windows 10: Password Less SSH between postgres and barman users in WSL2 - Not Working

Discus and support Password Less SSH between postgres and barman users in WSL2 - Not Working in Windows 10 Gaming to solve the problem; HelloI have Installed Windows Subsystem for Linux on a windows 10 Pro machine. I have installed two software packages in itPostgreSQL database packages... Discussion in 'Windows 10 Gaming' started by kamal a1, Oct 11, 2024.

  1. kamal a1 Win User

    Password Less SSH between postgres and barman users in WSL2 - Not Working


    HelloI have Installed Windows Subsystem for Linux on a windows 10 Pro machine. I have installed two software packages in itPostgreSQL database packages for which "postgres" is the user 2Barman Packages for which "barman" is the user.I'm trying to establish "password less SSH authentication" between the "postgres" and "barman" users within WSL2 on my Windows 10 Pro machine. I've followed these steps:Generated SSH keys 4096 bits for both users using ssh-keygen -t rsa -b 4096.Copied the public key of "postgres" to the authorized_keys file of the "barman" user at /var/lib/barman/.ssh/authorized

    :)
     
    kamal a1, Oct 11, 2024
    #1
  2. IonutIT Win User

    Weird SSH issue with WSL2 (and WSL1)

    Hello all,

    So this is something that has been bugging me for a while now.

    I have this situation where I connect using SSH: My_Computer --SSH-> ServerA --SSH-> ServerB

    The connection to ServerA is done with public key auth, and the connection from ServerA to ServerB is regular username/password.

    For some strange reason, whenever I use WSL2 with an Ubuntu image (the default over the Windows Store), I never get to connect to ServerB. I successfully connect from my computer to ServerA with my key and from there the moment I input "ssh username@serverB"
    I immediately get the error "ssh_exchange_identification: Connection closed by remote host", like instantly, which is very weird, as I assume the segment ServerA -> ServerB doesn't have much to do with WSL2, especially since the first connection from my computer
    (running WSL2) to ServerA works perfectly fine.

    I can replicate this issue on several computers and always with WSL (1 and 2).

    Using any other solution, like Putty, SolarPutty, SnowflakeSSH, actual Ubuntu VM using Hyper-V/Virtualbox/VMWare works perfectly fine all the way up to ServerB.

    Can anyone shed any light into this?

    Thanks.
     
    IonutIT, Oct 11, 2024
    #2
  3. Setting up SSH in WSL2

    Hey there! I have been using Ubuntu 20.04 on WSL2. I have successfully installed SSH in it, but while trying to connect with my IP Address, it shows the error "ssh: connect to host <IP Address> port 22: connection refused". I have already tested the same
    installation procedure in Ubuntu 20.04 and it worked great. What is wrong with WSL or WSL2? Please help!


    Password Less SSH between postgres and barman users in WSL2 - Not Working f4eb6087-fcca-4a20-b571-1a45b850474c?upload=true.png
     
    Gorakh Nath Sharma, Oct 11, 2024
    #3
  4. Password Less SSH between postgres and barman users in WSL2 - Not Working

    SSH connection From Mac to WSL2 ubuntu bash

    Hi ,Joao Vieira-Ribeiro



    Welcome to Microsoft Community.

    Since the SSH connection From Mac to WSL2 ubuntu bash let me point you in the right direction.

    I would suggest you to post your query in Microsoft Learn: Build skills that open doors in your career team and they will help you with the appropriate details.



    Best Regards,



    Hinata



    Microsoft Community Support Specialist
     
    Hinata- MSFT, Oct 11, 2024
    #4
Thema:

Password Less SSH between postgres and barman users in WSL2 - Not Working

Loading...
  1. Password Less SSH between postgres and barman users in WSL2 - Not Working - Similar Threads - Password Less SSH

  2. Password Less SSH between postgres and barman users in WSL2 - Not Working

    in Windows 10 Software and Apps
    Password Less SSH between postgres and barman users in WSL2 - Not Working: HelloI have Installed Windows Subsystem for Linux on a windows 10 Pro machine. I have installed two software packages in itPostgreSQL database packages for which "postgres" is the user 2Barman Packages for which "barman" is the user.I'm trying to establish "password less SSH...
  3. Password Less SSH between postgres and barman users in WSL2 - Not Working

    in Windows 10 Customization
    Password Less SSH between postgres and barman users in WSL2 - Not Working: HelloI have Installed Windows Subsystem for Linux on a windows 10 Pro machine. I have installed two software packages in itPostgreSQL database packages for which "postgres" is the user 2Barman Packages for which "barman" is the user.I'm trying to establish "password less SSH...
  4. SSH connection From Mac to WSL2 ubuntu bash

    in Windows 10 Gaming
    SSH connection From Mac to WSL2 ubuntu bash: Hi there, I enabled ssh connection from a Mac to WSL2 ubuntu following these steps-> https://www.hanselman.com/blog/the-easy-way-how-to-ssh-into-bash-and-wsl2-on-windows-10-from-an-external-machineThe first connection works well, but after terminating the session and start...
  5. SSH connection From Mac to WSL2 ubuntu bash

    in Windows 10 Software and Apps
    SSH connection From Mac to WSL2 ubuntu bash: Hi there, I enabled ssh connection from a Mac to WSL2 ubuntu following these steps-> https://www.hanselman.com/blog/the-easy-way-how-to-ssh-into-bash-and-wsl2-on-windows-10-from-an-external-machineThe first connection works well, but after terminating the session and start...
  6. WSL2 not working

    in Windows 10 Gaming
    WSL2 not working: Upgraded to Windows 11 today and decided to install WSL2, already have WSL1 and Ubuntu installed so I entered the commands "WSL --update" and after reboot "WSL --set-version Ubuntu-20.04 2" to upgrade to WSL2, but the latter command throws error: Please enable the Virtual...
  7. WSL2 not working

    in Windows 10 Software and Apps
    WSL2 not working: Upgraded to Windows 11 today and decided to install WSL2, already have WSL1 and Ubuntu installed so I entered the commands "WSL --update" and after reboot "WSL --set-version Ubuntu-20.04 2" to upgrade to WSL2, but the latter command throws error: Please enable the Virtual...
  8. Setting up SSH in WSL2

    in Windows 10 Customization
    Setting up SSH in WSL2: Hey there! I have been using Ubuntu 20.04 on WSL2. I have successfully installed SSH in it, but while trying to connect with my IP Address, it shows the error "ssh: connect to host <IP Address> port 22: connection refused". I have already tested the same installation...
  9. Weird SSH issue with WSL2 and WSL1

    in Windows 10 Customization
    Weird SSH issue with WSL2 and WSL1: Hello all, So this is something that has been bugging me for a while now. I have this situation where I connect using SSH: My_Computer --SSH-> ServerA --SSH-> ServerB The connection to ServerA is done with public key auth, and the connection from ServerA to ServerB is...
  10. Postgres Folder In C:\Users ???

    in Windows 10 Support
    Postgres Folder In C:\Users ???: I recently noticed this folder in my C:\Users folder named postgres. I didn't find mush about it when searching the web. I was wondering what this might be associated with? Here are a few screenshots I took. Showing it's location and the folders therein. [img] [img] The...