• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

telnet

Run Telnet on Git Bash

October 20, 2021

Although telnet is not used regularly since insecure, it’s a handy tool for testing ports.

For example, to check if a port 80 is open, you run this command.

$ telnet servername 80

$ telnet servername 80

Git Bash does not come with telnet, but you can use the Windows version by using winpty.

$ winpty telnet servername 457
Connecting To servername...Could not open connection to the host, on port 457: Connect failed

$ winpty telnet servername 457 Connecting To servername...Could not open connection to the host, on port 457: Connect failed

If port is open, you get an empty reply, just like in Windows.

Filed Under: Linux Tagged With: check, git bash, ports, telnet, windows

Check Open Ports Remotely

August 17, 2021

Here are a few tools to check if ports are open from a remote host.

nc -zvw10 192.168.0.1 22
nmap 192.168.0.1 -p 22
telnet 192.168.0.1 22

nc -zvw10 192.168.0.1 22 nmap 192.168.0.1 -p 22 telnet 192.168.0.1 22

You may have to install netcat and nmap if missing in your distro.

yum install nc
yum install nmap

yum install nc yum install nmap

Filed Under: Linux Tagged With: check, nc, nmap, open, ports, remote, telnet

Testing a Network Port Connection

October 10, 2018

You can test a network port connection using the “nc” command on Linux and “telnet” on Windows.

Format:
$ nc -zv domain.com port
C:\> telnet domain.com port

$ nc -zv domain.com 80
Connection to domain.com 80 port [tcp/http] succeeded!

$ nc -zv domain.com 80 Connection to domain.com 80 port [tcp/http] succeeded!

C:\> telnet -zv domain.com 80
Connecting To domain.com...Could not open connection to the host, on port 80: Connect failed

C:\> telnet -zv domain.com 80 Connecting To domain.com...Could not open connection to the host, on port 80: Connect failed

For Telnet, if a connection is successful, it returns no message.

Filed Under: Cloud, Linux Tagged With: connection, nc, port, telnet, test

  • Home
  • About
  • Archives

Copyright © 2023