任务单 #44770

SSL handshake issue with AWS EC2

开放日期: 2022-06-07 19:22 最后更新: 2022-06-12 10:53

报告人:
属主:
(无)
类型:
状态:
开启
组件:
里程碑:
(无)
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
文件:
1
Vote
Score: 1
100.0% (1/1)
0.0% (0/1)

Details

I am using 4.106 tera term version. trying to make connection to the AWS EC2 instance from VM & tcp handshake is happening but SSL handshake is not happening. I am using SSH port 443 with version 2.

I do not get user authentication window after hitting connect.

I can connect from end user machine instead of VM.

please let us know if any additional settings required here.

任务单历史 (3/13 Histories)

2022-06-07 19:22 Updated by: sandeep_kumar
  • New Ticket "SSL handshake issue with AWS EC2" created
2022-06-07 20:10 Updated by: nmaya
  • 严重性 Update from 9 - Highest to 5 - Medium
  • 优先 Update from 9 - Highest to 5 - Medium
评论

Hi,

The port number what you are accessing is 443, it is not seems to SSH. What server software is listening on 443? Tera Term does not handle SSL/TLS because Tera Term is a SSH client software.

I know that your hope is connect to the port 443 of your EC2 server. But what do you want to do? Use shell via SSH? Entrust SSL handshake to a software and talk HTTP protocol manually?

2022-06-07 21:25 Updated by: sandeep_kumar
评论

443 is the custom port. when i am trying to connect from working machine i can see the tcp handshake & then ssl handshake. but with non-working machine i can only see tcp handshake.

the data i captured in Wireshark.

2022-06-07 22:01 Updated by: nmaya
评论
  • I question again. What server software and what version is listening on port 443?
  • Is Tera Term handshakes SSL, not SSH? I don't believe it.
  • "working machine" and "non-working machine" in your reply, the "machine" means client side PC? or server side?
  • If your "working machine" is client side, what SSH client software do you use in "working machine?"

If your "working machine" have Tera Term and it can login to EC2 server, I guess the causing factor is not a bug of Tera Term or ability of Tera Term. Probably usage of Tera Term, or settings of Tera Term, or setting of EC2 side, or network (filterling or firewall) issue.

2022-06-07 22:55 Updated by: sandeep_kumar
评论

I read the requirement field & i can see supported OS. working machine have windows 10 & non-working have server 2019.

is it correct, there is a limitation.

Requirements Supported operating systems:

Microsoft Windows 95 (*1) (*2) (*3) (*4) Microsoft Windows 98, 98 Second Edition Microsoft Windows Me Microsoft Windows NT 4.0 SP6 (*2) (*4) Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows Vista Microsoft Windows Server 2003, 2003 R2 Microsoft Windows Server 2008, 2008 R2 Microsoft Windows 7 Microsoft Windows 8 Microsoft Windows Server 2012 Microsoft Windows 8.1 Microsoft Windows Server 2012 R2 Microsoft Windows 10

2022-06-07 23:40 Updated by: nmaya
评论

About supported OS list, only we don't have Widnows 2019 Server software and unable to run and check. We don't put limitation code designedly.

Try to check followings:

  • Source IP address difference between working and non-working
    • Check packet pocily of EC2, and firewall software config of Server OS (e.g. iptables).
  • Outgoing packet
    • If both PCs are on different network, outgoing router deny SSH packet from "non-working machine."
    • I don't know about Widnows Server OS administration, but maybe Server version Windows deny some kind of packets.
  • SSH is not enabled in Tera Term
    • You can see captured packets. If server sends SSH server version and client (Tera Term) does not reply SSH client version, Tera Term is not enter SSH mode.
      • If then, use "/ssh". commandline parameter with hostname. Like this: www.example.com 443 /ssh
  • Check log file of SSH Server
  • Try other SSH client both of "working machine" and "non-working machine"
2022-06-10 18:14 Updated by: sandeep_kumar
评论

I tried to capture the traffic in different cases..

1. windows 10 machine:

Connection works with and without web proxy.

2. windows server 2016 & 2019:-

  1. connection works with web proxy. After TCP handshake i can see the ssl handshake to the proxy ip (wireshark pcap).
  2. connection not working without proxy. I can see TCP handshake but SSL handshake is not initiating by tera term or Server.

I am not sure if its tera term issue or server issue. But with the wireshark logs i can clearly say the source is not initiating ssl handshake request.

i attached the screen shot of tera term, as how i am trying to connect.

(Edited, 2022-06-11 11:18 Updated by: nmaya)
2022-06-10 22:31 Updated by: zmatsuo
评论

Using netcat to check your connection to server from client.

port 22 (SSH)

nc shell.osdn.jp 22
SSH-1.99-OpenSSH_6.7p1 Debian-5+deb8u8

port 23 (telnet, Access Denied)

nc shell.osdn.jp 23

port 80 (WWW)

nc www.osdn.net 80
GET / HTTP/1.0

HTTP/1.1 301 Moved Permanently
Date: Fri, 10 Jun 2022 13:12:29 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: close
Server: Apache/2.4.25 (Debian)
Location: https://osdn.net/

Using telnet

port 22 (SSH)

telnet shell.osdn.jp 22
Trying 44.236.100.252...
Connected to shell.osdn.jp.
Escape character is '^]'.
SSH-1.99-OpenSSH_6.7p1 Debian-5+deb8u8

port 23 (telnet, Access Denied)

telnet shell.osdn.jp 23
Trying 44.236.100.252...
telnet: Unable to connect to remote host: Connection timed out

(Edited, 2022-06-12 10:07 Updated by: nmaya)
2022-06-10 22:41 Updated by: sandeep_kumar
评论

i use to connect 443 & i can telnet the port perfectly.

2022-06-12 00:48 Updated by: zmatsuo
评论

I heard Windows 2019 server has ssh.exe. Can that ssh.exe connect to server ?

2022-06-12 10:53 Updated by: nmaya
评论

Usage of ssh.exe with port number:

C:\Users\maya>ssh.exe -v shell.osdn.jp 22
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Connecting to shell.osdn.jp [44.236.100.252] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\maya/.ssh/id_rsa type -1
debug1: identity file C:\\Users\\maya/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\maya/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\maya/.ssh/id_dsa-cert type -1
debug1: identity file C:\\Users\\maya/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\maya/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\maya/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\maya/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\maya/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\maya/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 1.99, remote software version OpenSSH_6.7p1 Debian-5+deb8u8
debug1: match: OpenSSH_6.7p1 Debian-5+deb8u8 pat OpenSSH* compat 0x04000000
debug1: Authenticating to shell.osdn.jp:22 as 'maya'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:CZHWOCUwQFZD+sD41mukreoxzLYhKZffs+EKXDCK1L0
debug1: read_passphrase: can't open /dev/tty: No such file or directory
The authenticity of host 'shell.osdn.jp (44.236.100.252)' can't be established.
ECDSA key fingerprint is SHA256:CZHWOCUwQFZD+sD41mukreoxzLYhKZffs+EKXDCK1L0.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Please let us know each of results:

  • ssh.exe -v yourserrver 443 from windows 10 machine
  • ssh.exe -v yourserrver 443 from windows 2016 server
  • ssh.exe -v yourserrver 443 from windows 2019 server

You can hide IP address and hostname from the log.

2022-06-12 10:53 Updated by: nmaya
评论

And your network configuration like this?

                                                                    |                |
                                                     Your Network   |   Internet     |   AWS
                                                                    |                |
+-----------------+  with TTProxy?   +---------------+              |                |
|                 +---+------------->|               |              |                |
|   Windows 10    |   |              |   Web Proxy   +----+         |                |
|                 +-------+          |               |    |         |                |
+-----------------+   |   |          +---------------+    |         |                |
                      |   |                               |         |                |
+-----------------+   |   |                               |    +----+---+          +-+------------------+       +---------------+
|                 +---+   |                               +--->|        |          |                    |       |               |
|  Windows 2016   |   |   |      Direct (without proxy)        |   GW   +--------->|  Security Group    +------>|  EC2 Server   |
|                 +-------+----------------------------------->|        |          |    Inbound rule    |       |     sshd:443  |
+-----------------+   |   |                                    +----+---+          |                    |       |               |
                      |   |                                         |              +-+------------------+       +---------------+
+-----------------+   |   |                                         | All accesses   |
|                 +---+   |                                         | (with/without  |
|  Windows 2019   |       |                                         | proxy) are     |
|                 +-------+                                         | from same IP   |
+-----------------+                                                 | address?       |

(Edited, 2022-06-12 11:00 Updated by: nmaya)

Attachment File List

编辑

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登录名