<p>I've been using <a href="http://www.jcraft.com/jsch/" rel="nofollow noreferrer">JSch</a> for a couple of weeks now.  It seems to <em>work</em> okay, but its API is a little bit cumbersome.  I'm also a little off put by its total lack of documentation (not even javadoc style comments).  Has anyone used a good Java SSH2 library that they'd recommend.  I'm particularly interested in SCP file transfer and issuing commands to a remote Linux box programmatically via the SSH protocol.</p>

This will work if there is only one member in the array:
```
```
<?php
 echo current(returnsAnArray());
 ?>
```
```