As I non root user ( nmap is not installed) I want to find out if I can ssh to a box.
I tried telnet x.y.z.a 22 and if it is open, it show on the screen and then does not terminate process so my script can do something. If it is not open, I still have a process that stays open for too long.
what I am looking for is
$ line of code
$ if $? then xxxx
I am in a large network and some systems are available from some ip's and in other environments they are not .