Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 224873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:21:29+00:00 2026-05-11T19:21:29+00:00

This is driving me crazy. I run into this every now and then on

  • 0

This is driving me crazy. I run into this every now and then on a new ubuntu/debian server.
Basically I can’t do a exec! through net-ssh. Note, that I can require ‘net/ssh’ perfectly fine.

sample code

require 'rubygems'
require 'net/ssh'

Net::SSH.start('my.random.box', 'myuser', :forward_agent => "true") do |ssh|

  #output = ssh.exec("hostname")
  #puts output 

  output = ssh.exec!("hostname")
  puts stdout
end

relevant system environment info

me@box:~$ gem list | grep net-ssh
net-ssh (2.0.11)
me@box:~$ which ruby
/usr/bin/ruby
me@box:~$ which gem
/usr/bin/gem


cyn0n@spicetrader:~$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.4
  - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /home/me/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gems.rubyforge.org/", "http://gems.github.com"]
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/
     - http://gems.github.com
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:21:30+00:00Added an answer on May 11, 2026 at 7:21 pm

    A couple of things to try:

    1. Verify that the exec! method is in the source.
    2. Check both gem repositories to make sure there isn’t an older net-ssh version in there. gem list has some oddities; it’s more straightforward to just go into the directories and see what’s there.
    3. require the current version in your script.

      require 'rubygems'

      gem 'net-ssh', '=2.0.11'

      require 'net-ssh'

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is driving me crazy and I can't find the answer anywhere. I have
This is driving me crazy. Please help. I am new to Spring and I
This has been driving me crazy for a few days now. I have an
This has been driving be crazy, but I can't seem to find an answer.
This is driving me crazy. I created a git repository in a Linux server
I've run into a problem that's driving me crazy. In my application (ASP.NET MVC2
This is driving me crazy. I am creating a splitview app on iPad. I
This is driving me crazy... With this simple code I keep getting file not
This is driving me crazy. I have a PHP script that gets some data
this is driving me crazy. I think my website is infected by some sort

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.