Forum Discussion

senju's avatar
senju
Copper Contributor
Jul 27, 2022

Connect to another node from Windows connected via ssh (WS2012R2 -(ssh)-> WS20106 -(ssh)-> RHEL7.2)

Hi,

 

I can't connect to another node from Windows connected via ssh (public key authentication).

I cannot get the result of the command execution via ssh.

Why??

 

 

[Environment]

 

Execution environment (1)

OS name: Microsoft Windows Server 2012 R2 Standard

OS version: 6.3.9600 N/A build 9600

ssh version: OpenSSH_7.5p1, LibreSSL 2.5.3

 

Execution environment (2)

OS name: Microsoft Windows Server 2016 Standard

OS Version: 10.0.14393 N/A Build 14393

ssh Version: OpenSSH_7.5p1, LibreSSL 2.5.3 Environment

 

Execution environment (3)

OS Name: Red Hat Enterprise Linux Server release 7.2 (Maipo)

ssh version: OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013

 

 

[Details]

(1) WS2012 → (ssh) → (2) WS2016 → (ssh) → x → (3) RHEL7.2
when I tried to make an ssh connection (public key authentication) from (2) to (3), but I could not get the command execution result on (1) from (3) via (2).


(2) WS2016 → (ssh) → (OK) → (3) RHEL7.2
Directly, I can make an ssh connection (2) --(ssh)-->> (3) .
(The command execution result can also be obtained.)
In the execution environment (2), the private key is registered by using the ssh-add command.

-----------
Q1.
Is it possible to make an ssh connection (public key authentication) from execution environment (2) to execution environment (3) with an ssh connection from execution environment (1) to execution environment (2)?

 

Q2.
If it is possible, please tell us how to set it up and how to make it work.

 


[environment]
(1) WINERY
(2) FREESIA
(3) lizard

(1) -->> (2)
---
C:\Windows\system32>ssh -o PreferredAuthentications=publickey "administrator@freesia" "hostname"
freesia

C:\Windows\system32>
---

===>>>Result is normal.

 


(2) -->> (3)
---
C:\Users\Administrator>ssh -o PreferredAuthentications=publickey senju@lizard "hostname"
lizard

C:\Users\Administrator>
---
===>>>Result is normal.

 

(1) -->> (2) -->> (3)

---
C:\Windows\system32>ssh -o PreferredAuthentications=publickey "administrator@freesia" "ssh -o PreferredAuthentications=publickey senju@lizard hostname"

---
===>>> No Result...

 

 

regards.

 

No RepliesBe the first to reply

Resources