1

I'm trying to open an SSH connection from a remote PowerShell connection. Meaning PC1 (Windows) successfully connects to PC2 (Windows) via Enter-PSSession command. Once connected, I'm trying to SSH to PC3 (RHEL).

After doing SSH key exchange between PC3 and PC2 I can successfully SSH (w/o pass) from PC2. But, when trying to ssh from PC1 (using the above scenario) I'm able to connect but I'm not getting the shell prompt.

I already tried the -T or -tt flags, didn't help. Also, root login is enabled.

I also run the ssh command using -vvv and got the following (at the end)

Raw data:

Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.

PS C:\Users\ymeloch> Enter-PSSession -ComputerName 10.122.2.254 -Credential ymeloch
[10.122.2.254]: PS C:\Users\ymeloch\Documents> ssh -vvv -tt root@8.200.1.111
ssh.exe : OpenSSH_7.3p1, OpenSSL 1.0.2j  26 Sep 2016
    + CategoryInfo          : NotSpecified: (OpenSSH_7.3p1, ...2j  26 Sep 2016:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
...
...
...
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: tty_make_modes: no fd or tio
debug3: send packet: type 98
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
debug2: channel 0: read drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug3: send packet: type 96
debug2: channel 0: input drain -> closed
Last login: Sun Jan 15 08:34:01 2017 from 8.20.0.207


W A R N I N G        W A R N I N G        W A R N I N G        W A R N I N G

                                LAB

W A R N I N G        W A R N I N G        W A R N I N G        W A R N I N G
  • Check /var/log/secure on the RHEL machine – Grisha Levit Jan 16 '17 at 5:46
  • Please do not post the same question on multiple StackExchange sites. – techraf Jan 16 '17 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.