Аналог telnet для windows 10

Table of Contents

If you are a Windows system administrator, you will surely know the importance of the Telnet command in your day-to-day life. As you know, all Windows versions starting with Vista come with the telnet client feature disabled by default. If you want to test the connectivity or reachability to a remote computer, you must enable the Telnet-Client optional Windows feature, or you will look for some alternative command to Telnet.

In this article, you will learn how to use Test-NetConnection cmdlet as an alternative of telnet in PowerShell.

Test a remote TCP port

Launch the PowerShell console and type the following command:

Test-NetConnection -ComputerName techtutsonline.com -Port 443

Where the -ComputerName parameter is used to specify the name (or IP address) of remote computer and -Port parameter is used to specify the TCP port that you want to test the connectivity for. See the following screenshot for reference:

Using Test-NetConnection as the Telnet alternative

Using Test-NetConnection cmdlet as the Telnet alternative

The above command tests the connectivity of your local computer with techtutsonline.com domain name on TCP port 443. By default, it gives you the information about remote server (by doing the name resolution), the name of source interface and it’s IP address.

The TcpTestSucceeded : True in output means the remote server is listening on that port and your system can reach it on that TCP port. If you see TcpTestSucceeded : False, it means something is wrong. Maybe server isn’t listening on that port or your connection attempt is blocked.

If you’re interested in adjusting the information level this command produces, you could add -InformationLevel parameter with either “Quiet” or “Detailed” values.

For instance, to see the test result only, you could use the same command as:

Test-NetConnection -ComputerName techtutsonline.com -Port 443 -InformationLevel Quiet

This command will return only True or False in output. You just saw how to use the Test-NetConnection cmdlet as an alternative of Telnet command. You could even use it as an alternative of Ping command or as an alternative of the Tracert command. Let’s see how.

Test regular Ping connectivity

If you want to test the regular ping connectivity to a remote computer, just omit the -Port parameter and use the command as shown below:

Test-NetConnection -ComputerName techtutsonline.com
Using Test-NetConnection as the Ping alternative

Using Test-NetConnection as the Ping alternative

This command will return the PingSucceeded and Round Trip Time (RTT) in output. If you are wondering on how to run a continuous ping in PowerShell, checkout this article.

Tracing the Route

One more useful feature offered by Test-NetConnection cmdlet is its built-in ability to trace the route to a remote computer. Remember the tracert command we used for this purpose? Well not anymore, you can use the Test-NetConnection cmdlet for that too. To trace the route just use the following command:

Test-NetConnection techtutsonline.com -TraceRoute
Using Test-NetConnection as the Tracert alternative

Using Test-NetConnection as the Tracert alternative

The output isn’t like the one you see in tracert but you get the information about various hops in between and that’s all you need most of the time.

Tip: If you want to be able to use Telnet command in PowerShell exactly as you do in cmd.exe (command prompt), keep on reading the remaining article.

Creating Telnet PowerShell Module

Now that Telnet feature is disabled in every version of Windows but the good news is that every version of Windows comes with PowerShell installed out of the box. So we can create a PowerShell module that will work exactly like traditional Telnet command.

To create the Telnet PowerShell module, follow these steps:

  • Launch Windows PowerShell console and run the following command:
  • ise $(New-Item $HOME\Documents\WindowsPowerShell\Modules\Telnet\Telnet.psm1 -Force)

    The above command will create a PS module file at predefined location and automatically open that file in PowerShell ISE.

  • Now copy the following code, paste it in the PowerShell ISE and press “Ctrl+S” to save the module file.
<#
.Synopsis
Tests the connectivity between two computers on a TCP Port

.Description
The Telnet command tests the connectivity between two computers on a TCP Port. By running this command, you can determine if specific service is running on Server.

.Parameter <ComputerName>
This is a required parameter where you need to specify a computer name which can be localhost or a remote computer

.Parameter <Port>
This is a required parameter where you need to specify a TCP port you want to test connection on.

.Parameter <Timeout>
This is an optional parameter where you can specify the timeout in milli-seconds. Default timeout is 10000ms (10 seconds)

.Example
Telnet -ComputerName DC1 -Port 3389
This command reports if DC1 can be connected on port 3389 which is default port for Remote Desktop Protocol (RDP). By simply running this command, you can check if Remote Desktop is enabled on computer DC1.

.Example
Telnet WebServer 80
This command tells you if WebServer is reachable on Port 80 which is default port for HTTP.

.Example
Get-Content C:\Computers.txt | Telnet -Port 80
This command will take all the computernames from a text file and pipe each computername to Telnet Cmdlet to report if all the computers are accessible on Port 80.
#>
Function Telnet{

    [CmdletBinding()]
    param(
        [Parameter(Mandatory=$true,
                   ValueFromPipeline=$true,
                   ValueFromPipelineByPropertyName=$true)]
        [Alias ('HostName','cn','Host','Computer')]
        [String]$ComputerName='localhost',
        [Parameter(Mandatory=$true,
            ValueFromPipeline=$true,
            ValueFromPipelineByPropertyName=$true)]
        [int32]$Port,
         [int32] $Timeout = 10000
    )

    Begin {}

    Process {
    foreach($Computer in $ComputerName) {
    Try {
          $tcp = New-Object System.Net.Sockets.TcpClient
          $connection = $tcp.BeginConnect($Computer, $Port, $null, $null)
          $connection.AsyncWaitHandle.WaitOne($timeout,$false)  | Out-Null 
          if($tcp.Connected -eq $true) {
          Write-Host  "Successfully connected to Host: `"$Computer`" on Port: `"$Port`"" -ForegroundColor Green
      }
      else {
        Write-Host "Could not connect to Host: `"$Computer `" on Port: `"$Port`"" -ForegroundColor Red
      }
    }
    
    Catch {
            Write-Host "Unknown Error" -ForegroundColor Red
          }

       }
    
    }
    End {}
}
  • At the end of all the steps, your PowerShell module should be available at the location as shown in image below:

PowerShell Module

That’s it! Your Telnet PowerShell module is ready. Use can start using it like a traditional telnet command.

  • Close the current PowerShell console and open a new one. Type the following command:
Get-Help Telnet -Full

Below is the snapshot of Get-Help Telnet -Full command:

NAME
    Telnet

SYNOPSIS
    Tests the connectivity between two computers on a TCP Port


SYNTAX
    Telnet [-ComputerName] <String> [-Port] <Int32> [[-Timeout] <Int32>] [<CommonParameters>]


DESCRIPTION
    The Telnet command tests the connectivity between two computers on a TCP Port. By running this command, you can determine if specific service is running on
    Server.


PARAMETERS
    -ComputerName <String>

        Required?                    true
        Position?                    1
        Default value                localhost
        Accept pipeline input?       true (ByValue, ByPropertyName)
        Accept wildcard characters?  false

    -Port <Int32>

        Required?                    true
        Position?                    2
        Default value                0
        Accept pipeline input?       true (ByValue, ByPropertyName)
        Accept wildcard characters?  false

    -Timeout <Int32>

        Required?                    false
        Position?                    3
        Default value                10000
        Accept pipeline input?       false
        Accept wildcard characters?  false

    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

    -------------------------- EXAMPLE 1 --------------------------

    PS C:\>Telnet -ComputerName DC1 -Port 3389

    This command reports if DC1 can be connected on port 3389 which is default port for Remote Desktop Protocol (RDP). By simply running this command, you can check
    if Remote Desktop is enabled on computer DC1.


    -------------------------- EXAMPLE 2 --------------------------

    PS C:\>Telnet WebServer 80

    This command tells you if WebServer is reachable on Port 80 which is default port for HTTP.


    -------------------------- EXAMPLE 3 --------------------------

    PS C:\>Get-Content C:\Computers.txt | Telnet -Port 80

    This command will take all the computernames from a text file and pipe each computername to Telnet Cmdlet to report if all the computers are accessible on Port
    80.

RELATED LINKS

Look! You just created a Windows PowerShell module that will feel and behave exactly like regular cmdlets. You can use parameters like -ComputerName, -Port, -Credential, -Verbose, -ErrorAction etc. which is awesome.

Using Telnet Cmdlet

Now, its time to use our newly created Telnet Module. As shown in examples of cmdlet, you can use the Telnet module in 3 different ways.

First Way:

Telnet -ComputerName techtutsonline.com -Port 80
Successfully connected to techtutsonline.com on Port: 80

Second Way:

Telnet techtutsonline.com 80
Successfully connected to techtutsonline.com on Port: 80

Third Way:

Get-Content D:\Servers.txt | Telnet -Port 80
Successfully connected to WebServer on Port: 80
Could not connect to DC1 on Port: 80
Successfully connected to Linux-Box on Port: 80

Congratulations! Your Telnet module is working as expected. The good thing about this module is that you can use same command that used to work with cmd.exe.

This cmdlet is an ideal way to work on client’s servers where you do not have authority (or you do not want) to enable Telnet-Client Windows feature for any reason.

Несмотря на то, что Telnet протокол уже редко используется, что связано с отсутствием шифрования и проверки подлинности данных, у некоторых пользователей могут возникать задачи, требующие подключения с использованием клиента Telnet.

В Windows 11 и Windows 10 клиент для Telnet протокола присутствует, но отключен по умолчанию. При необходимости его можно включить одним из способов, описанных далее.

Компоненты Windows

Клиент Telnet — один из дополнительных компонентов Windows, который может быть включен, как и другие такие компоненты:

  1. Нажмите клавиши Win+R на клавиатуре (либо нажмите правой кнопкой мыши по кнопке «Пуск» и выберите пункт «Выполнить»), введите appwiz.cpl и нажмите Enter.
  2. В открывшемся окне в панели слева нажмите по пункту «Включение или отключение компонентов Windows».
    Установка дополнительных компонентов Windows

  3. Отметьте «Клиент Telnet» в списке доступных компонентов и нажмите «Ок».
    Включить Telnet в панели управления Windows

Останется дождаться, когда клиент Telnet будет установлен.

Для начала использования достаточно будет запустить командную строку, ввести команду telnet и нажать Enter.

Клиент Telnet запущен в командной строке

Командная строка

Вы можете включить Telnet в командной строке, установив компонент с помощью DISM:

  1. Запустите командную строку от имени администратора.
  2. Введите команду
    dism /online /Enable-Feature /FeatureName:TelnetClient

    и нажмите Enter.

    Установка Telnet в командной строке

  3. Дождитесь завершения установки компонента.

Windows PowerShell

Включить компонент можно и в PowerShell: запустите Windows PowerShell или Терминал Windows от имени администратора, сделать это можно в контекстном меню кнопки «Пуск», после чего введите команду:

Enable-WindowsOptionalFeature -Online -FeatureName TelnetClient

и нажмите Enter. Через короткое время клиент Telnet будет установлен на вашем компьютере.

Установка Telnet в PowerShell

Завершая статью, поинтересуюсь: для какой цели вам потребовался именно Telnet клиент в наше время SSH, шифрования и защищенных протоколов? Будет отлично, если вы сможете поделиться этим в комментариях.

WinSCP 6.5.1

WinSCP — удобный в использовании инструмент для защищенного копирования файлов между…

PuTTY 0.82

Putty – бесплатный Telnet/SSH клиент. Это клиентская программа для протоколов SSH и Telnet, SCP и SFTP, утилита для генерации RSA и DSA ключей, и многое другое…

FileZilla 3.69.1

FileZilla — Один из лучших, бесплатный FTP-менеджер, предназначенный для загрузки и скачивания…

KiTTY 0.76.1.13

KiTTY — модификация популярнейшего Telnet-SSH-клиента PuTTY, но с некоторыми улучшениями и оптимизациями для более удобной и продуктивной работы…

SecureCRT 9.6.2.3540

SecureCRT — Win32 эмулятор терминала, позволяющий производить соединения с компьютером в…

ZOC 7.11.3

ZOC — терминальная программа. Возможности: соединение через модем, telnet, SSH, Unix Rlogin; передача…

Secure Shell, SSH for short, is a network protocol which is used to connect to Linux, UNIX servers, network equipment, and any other SSH protocol supported devices over the network. By default, we can use SSH protocol in Linux and Mac but Windows OS does not have a native SSH client (though you can get it by Windows 10 ‘Features on Demand’).

If you want to connect to a remote device through SSH protocol, then PuTTY is one of the best SSH clients for Windows 10, 8.1/7. Even then, PuTTY does not have many features its alternatives provide. So this article is to list down the best SSH clients and PuTTY alternatives for Windows  OS.

1) PuTTY Tray

putty tray for Windows 10

PuTTY Tray is a free and open-source SSH client for Windows 8.1 and 10. PuTTY Tray is based on PuTTY and extends the functionalities through add-ons to make the user experience much better than the original PuTTY. PuTTY Tray has the following features:

● Can be minimized to the system tray.
● Customizable icons and windows transparency.
● Session configurations can be stored as files for portability.
● Always On Top setting for easy access.

Download PUTTY Tray

2) KiTTY

kitty ssh client - Best alternatives for PuTTY

KiTTY is another very simple alternative for PuTTY. It is simply a fork of the original PuTTY and has all the features with and adds some. KiTTY’s user interface is much the same as PuTTY’s, so it is very familiar and easy to learn. Some of the features included in KiTTY are:

● Shortcuts for pre-defined commands.
● Automatic password entry.
● Running a locally saved script on a session.
● Storing a script to local storage for portability.
● A different icon for every session.

Download KiTTY here

3) SuperPuTTY

Super Putty

SuperPuTTY is a very popular SSH client for Windows Operating System to connect network devices over the network. SuperPuTTY, like other PuTTY clients, tries to improve what PuTTY already does but it needs a PuTTY installation on the system on which SuperPuTTY is intended to be used. Also, it allows multiple tabbed sessions included file transfers between the remote server and local storage. Following are some of the features:

● Export or import session configuration for portability.
● Customizable layouts for session views.
● Supports SSH, Telnet, and RAW protocols.
● Multiple sessions can be docked on the screen to allow easy workspace management.
● Upload files to a remote server securely using SCP or SFTP protocols.

Download SuperPuTTY

4) Bitvise SSH client

Bitvise SSH client

Bitvise SSH client is a good utility if you want to automate a connection to SSH servers. Bitvise is free for personal use and paid for commercial use. Bitvise SSH client provides claims to have an advanced graphical interface for SFTP clients and terminal emulators.

Download Bitvise SSH client

5) MobaXterm

MobaXterm SSH client with many tools for Windows

MobaXterm is the most positively received and widely regarded SSH client for Windows 10. It has both free and paid versions. It is targeted at all types of users like programmers, webmasters, IT administrators, or anyone who wants to manage a system remotely. MobaXterm is most popular for having a lot of features and support for plugins to extend those features. MobaXterm has no ads in both free and paid versions. Following are some of the features in MobaXterm:

● You can use UNIX commands in Windows.
● Support for a long list of protocols like SSH, FTP, and SFTP.
● Tabbed SSH sessions.
● GUI text editor.
● A portable version is also available.

Download MobaXterm Client here

6) SmarTTY

SmarTTY

Here is another tool called, SmarTTY. It gets updated regularly by its developers. SmarTTY is also known for combining several features in other PuTTY alternatives into one application. Some features include:

● Multiple tabs inside one SSH session.
● Transfer files and complete directories to and from a remote server.
● Edit files on the remote server.
● Ability to run graphical applications through built-in Xming addon.

Download SmarTTY Here

7) FireSSH Addon for Firefox and Chrome

FireSSH Addon for Firefox and Chrome

The FireSSH addon for Firefox and Chrome can work as an SSH client if you don’t want to install a separate SSH client or if you don’t have administrative rights on the Windows PC you are using. FireSSH is written in JavaScript and is platform-independent because it is available as an add-on for both Firefox and Chrome browsers which are easily available for Windows, Linux, and Mac.

Through FireSSH, you will be able to remotely connect to a remote SSH server through your browser and you will be able to open multiple SSH sessions in separate tabs. FireSSH is available on the add-ons page of Firefox and the Web Store in Chrome.

Here is the home page link

8) Terminals

Terminals SSH client for Windows 10

Terminals is one of those SSH clients with a polished user interface for making use of tabbed SSH sessions. Terminals is open-sourced and combine many features that are included in both free and paid SSH clients mentioned in this article. Following are the features included in Terminals:

● Session screenshot capture.
● SSH session connection history.
● Support for multiple protocols like Windows RDP, SSH, Telnet, FTP, SFTP.
● Network tools like Ping, DNS tools, Wake On LAN, etc.
● Multi-tab interface.
● Use the current terminal in fullscreen.

Get Terminals SSH Client for Windows Here

9) mRemoteNG

mRemoteNG remote admin client

mRemoteNG is the best open-sourced system administration tool with multiple protocols support. mRemoteNG’s main focus is to provide support for multiple protocols and the excellent user interface for an SSH client under one software. mRemoteNG has support for tabbed sessions. Some of the different protocols supported by mRemoteNG are:

● SSH
● Telnet
● HTTP/HTTPS
● Remote Desktop (RDP)
● Virtual Network Computing (VNC)
● RAW socket connections

Get it here

10) Dameware SSH client

Dameware SSH client

Dameware SSH client is a really nice alternative to PuTTY on Windows environment if you are looking for an SSH client with an easy to use and polished interface. Dameware has an easy to use console and allows multiple Telnet and SSH connections in multiple tabs. Some useful features of Dameware:

● Save favorite session configurations to your Windows PC.
● Access remote servers using multiple saved credentials.
● Manage multiple Telnet or SSH sessions with multiple tabs.

Download Dameware SSH client Here

We included some of the top best SSH clients for Windows 10 in this list. You can use them as alternatives for PuTTY as well. This was to help you know which different SSH clients you can choose from if you either want to use something other than PuTTY or you are new to handling remote servers through SSH clients in Windows. In the end, it will be a matter of personal preference to choose whichever SSH client you want to use.

Note: Article Written on Server 2012 R2 Preview Build, the functionality may change when released.

I have been waiting for years for a good replacement for what Telnet and Ping provide me. I am thrilled to announce today I discovered a legitimate replacement has come down the line! Recently Microsoft released the Preview of Server 2012 R2 and Windows 8.1. Packaged with those is PowerShell Version 4. I have not had a chance to do a deep dive into it yet. However, I have found out that there is a cool new cmdlet called Test-NetConnection.

The Test-NetConnection command does precisely what it sounds like. By default (No Parameters), the command performs a ping on internetbeacon.msedge.net, which at the time of writing, this is failing. This tool does a lot more than just ping, it also adds traceroute, and connection attempts to specified ports. Below is a snapshot of the Syntex for this cmdlet.

Let’s say we have a server running that allows Remote Desktop Connection. We know it exists. However, for some reason, connections are not working. Once you verified RDP is enabled through the console, the next step might be verifying you can get through the firewall. The way I usually approach this is by using “telnet server.name 3389″ well, the problem with this is that the server may not have the telnet client installed, that was an optional install starting in Server 2008.

I was hoping for something in PowerShell v3, but sadly nothing showed up. However, tonight I found out thanks to a Microsoft employee presenting named Bob Roudebush that this now exists! So instead of installing telnet, I can use the PowerShell cmdlet “Test-NetConnection server.name -Port 3389″. Please note that you can also use “Test-NetConnection server.name -CommonTCPPort RDP”

Let’s not stop at something that simple now, because PowerShell is all about automating. So let’s try to do something crazy. I know on my virtual lab at home, I have a few VM’s running, so let’s verify RDP is open on all of these servers. Luckily for me, most of them are joined to an Active Directory, so let’s do some magic.

(Get-ADComputer -LDAPFilter "(name=griffin*)").DNSHostName | Test-NetConnection -Port 3389

The above command pulls every computer from Active Directory (Using the Active Directory PowerShell Tools) and pipe it to Test-NetConnection, which specifies the RDP port.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как добавить свое разрешение экрана windows 10 intel
  • Windows 10 не подключается по rdp к windows server 2003
  • Установка windows на серверное железо
  • Windows 8 12in1 activated x86 x64 by bukmop ru
  • Как включить экранную клавиатуру на ноутбуке windows 10