Questions tagged [net-ssh]

A pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2.

A pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2. http://net-ssh.rubyforge.org/ssh/v2/api/

207 questions
0
votes
2 answers

Setup Varnish server with Rubber gem

I am trying to instal varnish on a cache server. My following stack with be... HA Proxy Servers ----> Cache (Varnish) Servers ----> Nginx + Unicorn Servers I have been able to correctly setup all the config files for HAProxy and Varnish to move…
0
votes
1 answer

Using Net::SSH Ruby library to remote command execution that requires sudo su - another user

My environment is configured with SSH password-less authentication for the user "master" between a node Server (Rundeck server) and node Target (remote Solaris host). On Target, I want to execute a script /app/acme/stopApp.sh with the user…
Bera
  • 1,272
  • 4
  • 23
  • 49
0
votes
2 answers

How to create an RVM environment on a server through net-ssh?

I have a script which is installing Ruby/RVM (and more) on my server to get an environment ready to deploy a Rails project. This script is in ruby and use the net-ssh lib to do the job. After having installed RVM, Ruby, I would like to create the…
Vincent Peres
  • 1,003
  • 1
  • 13
  • 28
0
votes
1 answer

How to access commands in bin folder through ruby net-ssh?

I'm using net-ssh to connect to my server and need to run some ruby command. The following doesn't work: puts ssh.exec!("ruby -v") bash: ruby: command not found I always need to specify the full path: puts…
Vincent Peres
  • 1,003
  • 1
  • 13
  • 28
0
votes
1 answer

ruby net-ssh calling bash script with interactive prompts

I have a problem that I hope you can help me with I’m trying to use ruby to ssh onto a machine and run a bash script, this part is fairly easy but the bash script requires me to entry a username and password interactively and this is where I’m…
user891380
  • 227
  • 6
  • 17
0
votes
1 answer

kill pid started with gem net-ssh

If you start a command in a remote server with the net/ssh gem, and the command is on a deadlock, how do find the pid of the process running in the remote server and kill it? Does net/ssh gem support this?
cjapes
  • 99
  • 9
0
votes
1 answer

ruby on rails ssh connection check validity

I'm making an ssh connection in my controller and displaying a view if the connection is established sucessfully. I need my action to redirect to 'denied_access' view if the connection is not established Here is my view where use enters his…
user1455116
  • 2,034
  • 4
  • 24
  • 48
0
votes
1 answer

ruby on rails net ssh strickhostkeychecking=no

Hi i have a net:ssh connection in the controller. I might change the host name dynamically while establishing the connection. But when it logs in for the first time, shell might ask permission whether to connect or not. Since iam connecting to it…
user1455116
  • 2,034
  • 4
  • 24
  • 48
0
votes
2 answers

Ruby Net-SSH-Shell get standard out from execute! method

How do I get stdout from the .execute method in Net-SSH-Shell With good 'ol Net-SSH, this is easy Net::SSH.start('host','user') do |ssh| puts ssh.exec! 'date' end Gives me Tue Jun 19 23:43:53 EDT 2012 but if I try to use a shell, I get a…
wmarbut
  • 4,595
  • 7
  • 42
  • 72
0
votes
1 answer

Is there a size limit for data returned by Net::SSH.exec command

I am trying to do file listing of a remote machine using the below code. Net::SSH.start(host_name, 'ec2-user') do |ssh| cmd = "ls #{get_ls_command(dir_loc, extension)}" ssh.exec!(cmd) do |channel, stream, data| if stream == :stderr # do…
randomuser
  • 1,858
  • 2
  • 17
  • 21
-1
votes
1 answer

Using Net::SSH to login to shell and get stateful output

I was reading the documentation (which is pretty outdated). Net-ssh does not have .shell method anymore? how can i achieve signing into the shell, run command and get stdout until its done? Can anyone point me to a good documentation or advice on…
suyesh
  • 530
  • 7
  • 23
-1
votes
1 answer

Stop SSH password prompts in serverspec

I'm in an environment with authentication tokens, so typically a SSH password is not required. My serverspec tests are always asking me for a password. Is there a way to prevent this? No password required: $ ssh atlspf01 newatson@atlspf01:~$ Yet,…
Neil H Watson
  • 1,002
  • 1
  • 14
  • 31
1 2 3
13
14