Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Raymond Barlow
    @raymanoz
    hey peeps
    Does anyone know how I can nohup/background something in net-ssh?
    Raymond Barlow
    @raymanoz
    if I run this command: ssh remoteserver "nohup longrunning.sh &"
    it behaves as expected
    if I do the same vie Net:SSH, it terminates immediately
    Michael Smith
    @lasthemy_twitter
    I'm interested in helping fix net-ssh/net-ssh#633. Anyone have context I should consider? Other places parsing the openssh key format I could make use of?
    Ivan Polchenko
    @i5okie
    hi
    i'm trying to create an interactive shell through bastion host..
    but .shell.open doesn't work. "block in start_session': undefined methodshell' for #<Net::SSH::Connection::Session:0x00007f"
    Ivan Polchenko
    @i5okie
    Okay so I got it to send my keystrokes.. even shift key..
    except if I click the return key.. it just does a newline. it doesn't send CR
    Ivan Polchenko
    @i5okie
    yeah. no mattery what I do. enter key just send \n.
    Ivan Polchenko
    @i5okie
    please halp
    kevhjelm
    @kevhjelm
    I'm trying to fetch a switch configuration using oxidized and this error shows up : "could not connect to ssh-agent: Agent not configured" what does this error mean?
    kevhjelm
    @kevhjelm
    any fix for this error? "raised Net::SSH::Disconnect with msg "disconnected: protocol error: rcvd type 0 (2)"
    Miklós Fazekas
    @mfazekas
    @kevhjelm see net-ssh/net-ssh#664
    ideally we'd need debug level logs from both sides. Can i connect to a such device?
    kevhjelm
    @kevhjelm
    to connect to the device is possible, but the error occurs when oxidized is trying to fetch the config
    #664 is actually an issue I started a while back
    It was never solved, still same problem
    Miklós Fazekas
    @mfazekas
    Yes put does it have a public ip? Have you tried to connect it with just net-ssh without oxidized?
    kevhjelm
    @kevhjelm
    I have not tried with net-ssh, how would I go about to do that?
    Miklós Fazekas
    @mfazekas
    gem 'net-ssh', '= 5.2.0'
    require 'net/ssh'
    puts Net::SSH::Version::CURRENT
    
    @host = 'foo.bar.com'
    @user = 'foo'
    Net::SSH.start(@host, @user) do |ssh|
      puts ssh.exec!('echo "hello"')
    end
    with a ruby script like the above
    kevhjelm
    @kevhjelm

    gem 'net-ssh', '= 5.2.0'
    require 'net/ssh'
    puts Net::SSH::Version::CURRENT

    @host = '10.20.4.10'
    @user = 'nettverk'
    Net::SSH.start(@host, @user) do |ssh|
    puts ssh.exec!('echo "hello"')
    end

    ERROR: While executing gem ... (Gem::CommandLineError)
    Unknown command net-ssh,
    Do I have to have the script in any specific location?
    ERROR: While executing gem ... (Gem::CommandLineError)
    Unknown command net-ssh,
    ./net.rb: line 2: require: command not found
    ./net.rb: line 3: puts: command not found
    ./net.rb: line 5: @host: command not found
    ./net.rb: line 6: @user: command not found
    ./net.rb: line 7: syntax error near unexpected token @host,' ./net.rb: line 7:Net::SSH.start(@host, @user) do |ssh|'
    Miklós Fazekas
    @mfazekas
    try ruby net.rb
    kevhjelm
    @kevhjelm
    oxidized@oxidized-virtual-machine:~/.config/oxidized$ ruby net.rb
    5.2.0
    Traceback (most recent call last):
    10: from net.rb:7:in <main>' 9: from /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh.rb:250:instart'
    8: from /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh/authentication/session.rb:62:in authenticate' 7: from /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh/authentication/session.rb:129:inexpect_message'
    6: from /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh/authentication/session.rb:100:in next_message' 5: from /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh/authentication/session.rb:100:inloop'
    4: from /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh/authentication/session.rb:101:in block in next_message' 3: from /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:175:innext_message'
    2: from /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:190:in poll_message' 1: from /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:190:inloop'
    /var/lib/gems/2.5.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/session.rb:198:in `block in poll_message': disconnected: protocol error: rcvd type 0 (2) (Net::SSH::Disconnect)
    Michael Smith
    @lasthemy_twitter
    How do you decide when to do releases?
    Miklós Fazekas
    @mfazekas
    When there is a need, and i have time, why?
    Michael Smith
    @lasthemy_twitter
    I'd like to use be able to incorporate the change for net-ssh/net-ssh#678 into a project (Bolt), so waiting on a release of it. I was also just curious.
    Michael Smith
    @lasthemy_twitter
    Is there anything I could do to help with that sort of preparation (prepare a changelog and version bump), or code review on other PRs?
    Laurent Vallar
    @Val
    #!/usr/bin/env ruby
    
    require 'net/ssh'
    
    ::Net::SSH.start('localhost.run', 'foo', user_known_hosts_file: '/dev/null') do |ssh|
      ssh.forward.local(3000, '127.0.0.1', 80)
    
      ## How to get localhost.run message without executing any command ?
      puts ssh.exec! nil
    
      # [...]
    end
    How could I use net-ssh to access https://localhost.run service which send information to stdout on connect but disable any command run ?
    Brandon Weaver
    @baweaver

    Is there anyone that could take a look over this PR and let us know what else needs to be done to finalize it?:

    net-ssh/net-ssh#677

    Boris
    @TheDeepestSpace

    Hello, I am confused about the success parameter in

    channel.exec("command") { |ch, success|  raise 'error' unless success }

    I read in the documentation for Net::SSH::Channel#send_channel_request that

    meaning of “success” and “failure” in this context is dependent on the specific request that was sent

    So what does success mean in the contexts of "exec"? Furthermore, how do I get it to be false (I am trying to make sure that error is raised properly)?

    Miklós Fazekas
    @mfazekas
    I guess success means that the process has been started, and you should get an exitcode later from the result of exec
    Boris
    @TheDeepestSpace
    Thanks! It indeed failed when I requested exec in a container with a pid limit.
    Dan Čermák
    @dcermak
    Is there an ETA for the 6.2.0 release? Vagrant recently switched to require net-ssh >= 6.2.0.rc1 but I unfortunately cannot update to rc1 in openSUSE
    getting a non-rc release would help me tremendously
    Miklós Fazekas
    @mfazekas
    Hi, i'll try to look into it in the weekend, if not please continue to ping me
    Dan Čermák
    @dcermak
    Thanks @mfazekas!
    Dan Čermák
    @dcermak
    @mfazekas friendly ping about the 6.2.0 release?
    Miklós Fazekas
    @mfazekas
    Hi i'll try to look into this weekend, sorry for the delays
    1 reply
    defolos
    @defolos:matrix.org
    [m]
    @mfazekas: sorry for being a PITA, but what about the 6.2.0 release?
    Miklós Fazekas
    @mfazekas
    Thanks for the ping. Sorry i've needed to migrate to github actions from travis ci, i'll try to release a new rc this weekend, please ping if i haven't done so. Then later i can do a final release.
    defolos
    @defolos:matrix.org
    [m]
    👍️
    Miklós Fazekas
    @mfazekas
    @defolos:matrix.org i've release rc2 please check. If ok, i'll release a final later this week
    1 reply