SSH Password Less Access between Windows and WSL for Barman Backups

9 views
Skip to first unread message

aksrin...@gmail.com

unread,
Oct 9, 2024, 12:46:53 AM10/9/24
to Barman, Backup and Recovery Manager for PostgreSQL

Hello,

I have a requirement where i have installed PostgreSQL database server and WSL (Ubuntu 22.0.4) set up installed on a windows machine. I have installed the Barman inside WSL for taking PostgreSQL backups installed on a windows machine. I have configured SSH between the Barman user in WSL and the Windows system user present in the host machine by copying the SSH keys between them.

However, I'm still being prompted for passwords when accessing either system from the other via SSH.

How can I achieve password less SSH access between Windows and WSL to streamline my Barman backup process?

Michał Kępczyński

unread,
Oct 9, 2024, 1:12:52 AM10/9/24
to pgba...@googlegroups.com
Check permission. 

The .ssh directory permissions should be 700 (drwx------).  The public key (.pub file) should be 644 (-rw-r--r--). The private key (id_rsa) on the client host, and the authorized_keys file on the server, should be 600 (-rw-------)

Michał

--
--
You received this message because you are subscribed to the "Barman for PostgreSQL" group.
To post to this group, send email to pgba...@googlegroups.com
To unsubscribe from this group, send email to
pgbarman+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pgbarman?hl=en?hl=en-GB

---
You received this message because you are subscribed to the Google Groups "Barman, Backup and Recovery Manager for PostgreSQL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pgbarman+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pgbarman/6ea1fabd-63a7-4e50-9d47-5050153764c7n%40googlegroups.com.

aksrin...@gmail.com

unread,
Oct 9, 2024, 1:50:00 AM10/9/24
to Barman, Backup and Recovery Manager for PostgreSQL
I tried setting these permissions but it is still asking the password when trying to connect from WSL to Windows host and Windows host to WSL too.. 

Michał Kępczyński

unread,
Oct 9, 2024, 3:20:44 AM10/9/24
to pgba...@googlegroups.com
Can you show me the output: ls -la ~/.ssh and paste command which you use to ssh to other machine?




--
Michał Kępczyński

Martin Marques

unread,
Oct 10, 2024, 8:46:14 AM10/10/24
to pgba...@googlegroups.com
Hi,

Why are you trying to set up an ssh connection between the WSL node
and the Windows machine hosting Postgres? There is no reason
whatsoever as rsync backups won't work with Windows and if you want to
copy files via archive_command the ssh connection would be in the
other direction.

In any case, this is not a question for a Barman forum, but for a ssh
or WSL forum.

Kind regard, Martín
Reply all
Reply to author
Forward
0 new messages