I am trying to test connectivity from source to a FTP server on port 22 using azure devops commandline tool in pipelines
Command for testing: telnet TestSFTP02 22
How do I make sure the telnet connectivity is closed after running this command via the command line?
You will need to kill the telnet
process. For example like this:
(timeout /T 5 > nul && taskkill /f /im telnet.exe > nul) | telnet TestSFTP02 22
Or use more powerful scripting language, like PowerShell.