Testing Remote TCP/IP Connectivity on IBM i (AS400)
Estimated reading time: 2 mins
PrefaceI’m used to run telnet to do a quick check if a remote server is reachable and listening on a specific port. When trying this on i5/OS with telnet CMD you may get headache! After some research I ended up with openssl in PASE to succeed my task on IBM i (AS400).
telnet vs openssl syntaxOn Telnet 5250 Command Line you first have to enter PASE using
openssl s_client -connect <server>:<port></pre>
telnet <server> <port>
as it is not installed in PASE.
Success, with server using SSL
openssl s_client -connect google.at:443 CONNECTED(00000003) : --- Certificate chain : --- New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256 Server public key is 2048 bit Secure Renegotiation IS supported : --- read:errno=0 $
me@somewhere:~$ telnet google.at 443 Trying 18.104.22.168... Connected to google.at. Escape character is '^]'. ^] telnet> quit Connection closed.
openssl s_client -connect google.at:1234 : : ...timeout is about a minute : connect: Connection timed out connect:errno=78 $
me@somewhere:~$ telnet google.at 4321 Trying 22.214.171.124... ^C
Success, with server not using SSL
openssl s_client -connect google.at:80 CONNECTED(00000003) : --- no peer certificate available --- : --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported : --- $
me@somewhere:~$ telnet google.at 80 Trying 126.96.36.199... Connected to google.at. Escape character is '^]'. ^] telnet> quit Connection closed.
Posted on: Wed, 08 Aug 2018 15:59:45 +0100 by Markus Neuhold