# Net::SSH and STDIN / Pending jobs

**URL:** <https://www.ruby-forum.com/t/net-ssh-and-stdin-pending-jobs/179509>\
**Category:** Ruby\
**Created:** [November 26, 2009, 2:01pm UTC](https://www.ruby-forum.com/t/net-ssh-and-stdin-pending-jobs/179509 "2009-11-26T14:01:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcruxen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ecae2f/32.png) [@fcruxen](https://www.ruby-forum.com/u/fcruxen)\
**Post date:** [November 26, 2009, 2:01pm UTC](https://www.ruby-forum.com/t/net-ssh-and-stdin-pending-jobs/179509/1 "2009-11-26T14:01:25Z")

</div>

Hi,

I am writing a library that allows the user to run some commands over  
SSH into a server and I have two problems right now:

1. The code get stuck whenever the executed code needs STDIN, it just  
sits there. How can I indicate that my STDIN is not interactive using  
Net::SSH?

2. When the user runs background jobs (like nohup  
/etc/init.d/start-something &) the script just sits there as well,  
waiting for jobs to finish.

Considering the script that is executed is a user input and, being so, I  
don’t have control over it, what would be the best way to avoid those 2  
issues?

Thanks a lot!

Best regards,  
Felipe.
