I typically use Python with pexpect to do this sort of thing. The folowing snippet will log on to a Brocade switch, run a command and return the result:<br><br>while True:<br>        logon_cmd = 'ssh ' + cfg_file.getVal("remote_user") + '@' + remote_host<br>
        #print 'logon_cmd = ' + logon_cmd<br>        child=pexpect.spawn(logon_cmd)<br>        i = child.expect(['password:',pexpect.EOF],timeout=10)<br>        if i == 1:<br>                print "EOF-1 returned"<br>
                time.sleep(30)<br>                continue<br>        child.sendline(cfg_file.getVal("remote_pw"))<br>        remote_prompt = cfg_file.getVal("remote_prompt")<br>        i = child.expect([remote_prompt, pexpect.EOF],timeout=10)<br>
        #returned_lines = child.after<br>        #print returned_lines<br>        if i == 1:<br>                print "EOF-2 returned"<br>                time.sleep(30)<br>                continue<br>        remote_cmd = cfg_file.getVal("portshow_cmd")<br>
        #print "remote_cmd = " + remote_cmd<br>        child.sendline(remote_cmd)<br>        i = child.expect([remote_prompt, pexpect.EOF],timeout=10)<br>        if i == 1:<br>                print "EOF-3 returned"<br>
                time.sleep(30)<br>                continue<br>        returned_lines = child.before<br>        child.close();<br><br>Thanks,<br>Larry Barber<br><br><br><div class="gmail_quote">On Thu, Mar 8, 2012 at 4:30 PM, Don Kuhlman <span dir="ltr"><<a href="mailto:Don.Kuhlman@schawk.com">Don.Kuhlman@schawk.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div>Hi folks. I've been googling all day, searching the forums, and looking at other spots but obviously I'm doing something wrong.</div>
<div><br>
</div>
<div>I'm trying to now setup some customization in Xymon for business applications.</div>
<div><br>
</div>
<div>I want to do it either with a homemade script, download, or using built in features.</div>
<div><br>
</div>
<div>My first task is to try and login to an ftp server using a test id and password to verify it is up and accepting connections.</div>
<div><br>
</div>
<div>Next would be to connect via sFTP and try the same thing.</div>
<div><br>
</div>
<div>I'm also trying to do the same kind of tasks with webpages that host applications.</div>
<div><br>
</div>
<div>Can someone point me to the best way to do this from our Xymon server, and if there are code snips of how to make an ftp connection, send an ID, Password, and then quit, I would really appreciate knowing where to find them.</div>

<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Don K</div>
</div>

<br>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br></blockquote></div><br>