<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-family: Calibri, sans-serif; ">
<div style="font-size: 14px; color: rgb(0, 0, 0); ">Ok. Since we are sort of talking about the protocol.cfg file and other related things, ;),  I wanted to try and verify my understanding of it and also pose another question about how the tests are working.</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">Our protocols.cfg file contains this for ssh|ssh1|ssh2</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; ">
<div style="color: rgb(0, 0, 0); ">[ssh|ssh1|ssh2]</div>
<div>   send <font class="Apple-style-span" color="#ff2500">"SSH-2.0-OpenSSH_4.1\r\n"</font></div>
<div><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">   expect "</span><font class="Apple-style-span" color="#ff2500">SSH</font>"</div>
<div><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">   options </span>
<font class="Apple-style-span" color="#ff2500">banner</font></div>
<div style="color: rgb(0, 0, 0); ">   port 22</div>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">I have a host running the ssh test configured as below in hosts.cfg:</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">1.2.3.4 sshostbeingtested.our.domain.com<span class="Apple-tab-span" style="white-space:pre">
</span>#fqdn.hostbeingtested.our.domain.com noconn ssh</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">This is an external server that is not ours and not on our internal network.</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">We are doing a sftp connection to it from applications and want to make sure sftp is working to that host.</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">The connection is using port 22 so that's why I picked the ssh test.</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">I can make a connection to that host over port 22 from a computer on our network.</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">It returns a string as below when I make a connection over port 22:</div>
<div>
<div>
<div>
<div style="font-size: 14px; "><font class="Apple-style-span" color="#ff2500"><br>
</font></div>
<div><font class="Apple-style-span" color="#ff2500" style="font-size: 12px;">SSH-2.0-mod_sftp/0.9.7</font></div>
<div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-size: 12px;">☻|      ¶╧▐÷⌐└⌡</span></div>
<div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-size: 12px;">               7ï╝ôm╫ë┬÷ïdiffie-hellman-group-exchange-sha256,diffie-hellman-gro</span></div>
<div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-size: 12px;">up-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,rsa1024-</span></div>
<div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-size: 12px;">sha1ssh-rsa,ssh-dssÅaes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes12</span></div>
<div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-size: 12px;">8-cbc,blowfish-ctr,blowfish-cbc,cast128-cbc,arcfour256,arcfour128,3des-ctr,3des-</span></div>
<div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-size: 12px;">cbcÅaes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-c</span></div>
<div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-size: 12px;">tr,blowfish-cbc,cast128-cbc,arcfour256,arcfour128,3des-ctr,3des-cbc:hmac-sha1,hm</span></div>
<div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-size: 12px;">ac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160:hmac-sha1,hmac-sha1-96,hmac-md5,h</span></div>
<div><span class="Apple-style-span" style="font-size: 12px;">mac-md5-96,hmac-ripemd160♦none♦noneV8┬·╗┐$█╥<font class="Apple-style-span" color="#ff2500">SSH-2.0-OpenSSH_4.1</font></span></div>
</div>
</div>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">1) So, is the ssh|ssh1|ssh2 test in protocols.cfg supposed to make the connection to the target host via port 22, then send it that string in red above - "SSH-2.0-OpenSSH_4.1\r\n" ?</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">2) If so, why would it send this, as we don't want to tell that to the host do we?</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">3) Then is it expecting the host to reply with only "SSH" or is it looking for anything matching that in the reply?</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">As you can see, the target host is sending a lot more back when you make a port 22 connection to it.</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">4) Is the options banner line supposed to say it's okay to send us all that other stuff back or not?</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">Thanks all.</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">If this has been answered, please send me the link as my google foo isn't fooing well again today while searching for this kind of clarification.</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); ">Don K</div>
<div style="font-size: 14px; color: rgb(0, 0, 0); "><br>
</div>
</body>
</html>