ssh - Change directory in server is not changing when trying from client - ruby -
this little part of code. if not sufficient, post total code. have few commands execute in server , works fine except changing directory cd command using require 'net/ssh'.
i have tried both cd , dir.chdirbut no luck. here @action directory name.
puts @ssh.exec!('pwd') @ssh.exec!("cd ./#{@action}") puts @ssh.exec!('pwd') i tried print nowadays working directory before , after executing command , shows same path without going required path.
ruby ssh cd net-ssh
No comments:
Post a Comment