0

This is small part of my code. If this is not sufficient, i will the post full code.
I have few commands to execute in the server and everything works fine except changing directory cd command using require 'net/ssh'.

I have tried with both cd and Dir.chdirbut no luck. Here @action is my directory name.

 puts @ssh.exec!('pwd')
 @ssh.exec!("cd ./#{@action}")
 puts @ssh.exec!('pwd')

I tried to print present working directory before and after executing the command and it shows the same path without going to the required path.

Rahul Dess
  • 2,397
  • 2
  • 21
  • 42

0 Answers0