En las versiones anteriores a Windows Server 2012 y Windows 10 es posible instalar la característica Telnet Server.
PS C:\> Install-WindowsFeature Telnet-Server
Las versiones posteriores no permiten esta característica y, por lo tanto, se debe instalar una aplicación de terceros. Algunas opciones recomendadas son:
Configurar usuarios de Telnet
PS C:\> New-LocalGroup –Name "TelnetClients"
PS C:\> Add-LocalGroupMember –Group "TelnetClients" –Member "<usuario>"
Habilitar el servicio Telnet
PS C:\> Start-Service –name "TlntSvr"
PS C:\> Set-Service –name "TlntSvr" –StartupType Automatic
Deshabilitar el servicio Telnet
PS C:\> Stop-Service –name "TlntSvr"
PS C:\> Set-Service –name "TlntSvr" –StartupType Disabled
Por ejemplo, si se ha instalado hk-telnet-server
, se debe ejecutar el archivo hk-telnet-server.exe
Configurar usuarios de Telnet
Habilitar el servicio Telnet
Presiona "Start"
No cierres la ventana, ya que esto detendría el servicio.
Deshabilitar el servicio Telnet
Tanto si se ha usado el Telnet Server de Windows como si se ha instalado una aplicación de terceros, es necesario abrir el puerto 23 en el firewall para poder acceder al servidor:
PS C:\> New-NetFirewallRule `
-Name "ByAdmin Telnet" -DisplayName "ByAdmin Telnet" `
-Description "Allow Telnet" `
-Profile Any -Direction Inbound -Action Allow `
-Protocol TCP -Program Any `
-LocalAddress Any -RemoteAddress Any -LocalPort 23 `
-Enabled True
Se puede instalar desde las características de Windows.
Windows Server (2016, 2019, …)
PS C:\> Install-WindowsFeature –name "Telnet-Client"
Windows Desktop (2010, 2011, …)
PS C:\> Enable-WindowsOptionalFeature –Online –FeatureName "TelnetClient"
Se pueden consultar con telnet -?
Sintaxis
telnet [OPCIONES...] [HOST [PUERTO]]
Opciones disponibles
-a
-e, CHAR
-f, ARCHIVE
-l, USER
-t, TERM
-?, --help
Mostrar la ayuda de Telnet
Muestra la ayuda de telnet
.
PS C:\> telnet -?
telnet [OPTION...] [HOST [PORT]]
HOST ip or hostname
PORT default 53
OPTIONS
-a, attempt automatic login
-e, CHAR use CHAR as an escape character
-f, ARCHIVE use ARCHIVE in login to remote system
-l, USER attempt automatic login as USER
-t, TERM use TERM={vt100,vt52,ansi,vtnt} as terminal type
-?, --help give this help list
Debes indicar el nombre o IP del servidor y luego introducir un usuario y contraseña válidos.
PS C:\> telnet 192.168.10.252
Trying 192.168.10.252...
Connected to 192.168.10.252
Escape character is ‘^]’
Debian GNU/Linux 11
Debian-11 login: <username>
Password: <userpassword>
Para desconectarse, escribe:
PS C:\> exit