SSHã®ã³ãã³ããRubyããå®è¡åºæ¥ãã便å©ã§ããããã·ã§ã«ã¹ã¯ãªããã¨Expectã§ãè¯ããã§ããï¼Rubyããã±ã¼ã¸ãå©ç¨ããã¨ãã£ã¨æ¸ãããããªãã¾ãããï¼ Net::SSHããã±ã¼ã¸ net-ssh 㯠version 1.x ã¨2.xããã£ã¦2.xã®æ¹ããããã«ããï¼æ®éã«ã¤ã³ã¹ãã¼ã«ããã¨2.xãå ¥ãã®ã§2.xãåæã«ããã ã¤ã³ã¹ãã¼ã« gem install net-ssh åºæ¬çãªä½¿ãæ¹ ãªã¢ã¼ããµã¼ãã¼å ã«ã¢ã¯ã»ã¹ããï¼ require 'rubygems' require 'net/ssh' Net::SSH.start('hostname', 'user', :password => 'password') do |ssh| puts ssh.exec! 'ls /etc/' end å ¬ééµã»ç§å¯éµã使ã£ã¦ãã°ã¤ã³ãã Net::SSH.start('hostna
{{#tags}}- {{label}}
{{/tags}}