Cannot get SSH setup to work #6
-
Hi, First of all, thanks for sharing this tool! I'd like to try it but for some reason, I cannot figure the SSH setup. The remote machine I'd like to " From my main Arch system ( % ping archlinux-laptop
% ssh archlinux-laptop just fine. Relevant part of Host archlinux-laptop
IdentityFile ~/.ssh/archlinux-desktop
User xfzv As mentioned in the README, from % sudo cp ~/.ssh/authorized_keys /root/.ssh
% sudo systemctl restart sshd However, from % pacpush -n archlinux-laptop
[sudo] password for xfzv:
The authenticity of host 'archlinux-laptop (xxx.xxx.xxx.xxx)' can't be established.
ED25519 key fingerprint is SHA256:<redacted>.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? no
archlinux-laptop: ssh check failed. Have you set up root ssh access to archlinux-laptop? I double checked:
Note that % ssh root@archlinux-laptop doesn't work either. I'm prompted for root user password so the key authentication is definitely not working. I have root SSH access with key authentication set up on another machine running Debian and it works just fine. What am I doing wrong? I read SSH AND KEY CONFIGURATION multiple times but I'm out of ideas. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
ssh configuration can be tricky so I will add a new section to the README. Following is a draft. Please try these commands and let me know what you find. TROUBLESHOOTING YOUR SSH CONFIGURATIONIf you are having problems with your ssh configuration, you can try what is Assume we have a Run following commands on
Both the above commands should list the contents of Again on
Both the above commands should each list the contents of |
Beta Was this translation helpful? Give feedback.
-
Pacpush is never going to work without debugging and fixing your ssh configuration which is the point of the new section I want to add. What environment are you running in? E.g. I use GNOME on Arch Linux and I see that SSH_AUTH_SOCK is set automatically on reboot by GNOME (points to |
Beta Was this translation helpful? Give feedback.
-
BTW, since you have |
Beta Was this translation helpful? Give feedback.
-
Another thing, while waiting for you to reply, whenever you have ssh issues a tip is to check/monitor your server side |
Beta Was this translation helpful? Give feedback.
-
Indeed, that was the issue. As expected, it works fine with - # IdentityFile ~/.ssh/archlinux-desktop
+ IdentityFile /home/xfzv/.ssh/archlinux-desktop I'll stick with that, it's probably better than copying Regarding the My setup is a bit unusual, my main distro on my desktop is Gentoo and I also have Arch installed on a separate SSD that is mounted to sudo chroot /media/Arch zsh -c "su $(whoami) -c 'pacpush archlinux-laptop'" This would be part of my maintenance/sync routine with my laptop so doing it with a single command and no other manual intervention would be nice. This works but only if adding a drop-in in
I'm not sure about the security implications of this so I might stick with a manual process (first chroot into |
Beta Was this translation helpful? Give feedback.
-
I added new section TROUBLESHOOTING YOUR SSH CONFIGURATION to the README. |
Beta Was this translation helpful? Give feedback.
BTW, since you have
IdentityFile ~/.ssh/archlinux-desktop
in your ssh config then when running as root the~
will resolve to roots home dir so you can either cp that same file there (which is ugly) or change the~
to your actual home dir path.