Sample Header Ad - 728x90

SSH Stuck waiting for reply after offering public key

0 votes
1 answer
69 views
### Info ### I have 2 remote machines, both are Linux and same OS version. When I tried to SSH to the machine as one of the user inside via public key, machineA works but machineB get stucked after offerring the public key. From what I understand, SSH uses StrictModes by default which requires: - In
/etc/ssh/sshd_config
, contains
yes
and
.ssh/authorized_keys
-
/home/
with
750
or stricter -
/home//.ssh
with
700
or stricter -
/home//.ssh/authorized_keys
with
600
or stricter ### What I have done? ### For my requirements, I need the
of
to be managed by another user, let's say
. So I have done the following configurations to allow
to manage
's
chmod 750 /home/
chmod 700 /home//.ssh
chmod 600 /home//.ssh/authorized_keys
setfacl -m u::rwx /home/
setfacl -m u::rwx /home//.ssh
setfacl -m u::rwx /home//.ssh/authorized_keys
So I enter both machineA & machineB as admin via password and paste my public key into
/home//.ssh/authorized_keys
When I tried SSH to both system via Putty, machineA works but machineB fails. ### Loggings ### This is the event logs of putty when try to SSH to machineB, it's stuck after
public key
MachineB SSH Putty event log And this is the
-f /var/log/auth.log
at machineB: Tail auth.log I check these configurations at both machines: - ✅ownership of file/directory is the user - ✅permission is same as previous statement - ✅both machines had same configurations Comparisons of machines' configurations I also tried
/usr/sbin/sshd -d -p 2222
at target machine and SSH to the system via command prompt using
-i C:\path\to\private-key -p 2222 @
and this is the log I got: sshd 2222 log ### Others things tried ### - Revoke all ACL permission on machineB, and able to SSH to machineB via public key after that. - Set
no
in
/etc/ssh/sshd_config
at machineB, and it works afterwards. But I know this is not a good idea. - Check
/etc/ssh/sshd_config
at machineA, and it has
yes
commented, but I believe it's enabled by default. ### Questions ### - What configurations that I may missed? - Is it related to proxy? Because machineA is behind a proxy while machineB is not. Any help or insight is appreciated :D
Asked by Ronald Koh (1 rep)
May 16, 2025, 06:15 AM
Last activity: Jun 21, 2025, 12:26 AM