# Listing files in remotely with net::ssh?

**URL:** <https://www.ruby-forum.com/t/listing-files-in-remotely-with-net-ssh/117642>\
**Category:** Ruby\
**Created:** [October 18, 2007, 9:43pm UTC](https://www.ruby-forum.com/t/listing-files-in-remotely-with-net-ssh/117642 "2007-10-18T21:43:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![glacius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@glacius](https://www.ruby-forum.com/u/glacius)\
**Post date:** [October 18, 2007, 9:43pm UTC](https://www.ruby-forum.com/t/listing-files-in-remotely-with-net-ssh/117642/1 "2007-10-18T21:43:10Z")

</div>

I want to connect to a remote server which I am able to do fine, I  
would like to specify a directory and list the contents.

Anyone have any quick and simple solutions to do this or can point me  
in the direction of any tutorials?

Thanks

---

<div class="post-metadata">

**Author:** ![glacius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@glacius](https://www.ruby-forum.com/u/glacius)\
**Post date:** [October 19, 2007, 2:27pm UTC](https://www.ruby-forum.com/t/listing-files-in-remotely-with-net-ssh/117642/2 "2007-10-19T14:27:45Z")

</div>

On Oct 18, 2007, at 2:42 PM, Gian H. wrote:

> I want to connect to a remote server which I am able to do fine, I  
> would like to specify a directory and list the contents.
> 
> Anyone have any quick and simple solutions to do this or can point me  
> in the direction of any tutorials?

I would take a look at the gl\_tail project [1]. It uses net-ssh  
pretty extensively and has lots of code showing how to send commands  
as part of your ssh session.

cr

[1] [http://www.fudgie.org/](http://www.fudgie.org/)
