module ZTK::SSH::Console
Public Instance Methods
console(*arguments)
click to toggle source
Launches an SSH
console, replacing the current process with the console process.
@example Launch a console:
ssh = ZTK::SSH.new ssh.config do |config| config.user = ENV["USER"] config.host_name = "127.0.0.1" end ssh.console
# File lib/ztk/ssh/console.rb, line 17 def console(*arguments) command = [console_command, *arguments].flatten.compact.join(' ') config.ui.logger.debug { "config=#{config.send(:table).inspect}" } config.ui.logger.info { "console(#{command.inspect})" } config.ui.logger.fatal { "REPLACING CURRENT PROCESS - GOODBYE!" } Kernel.exec(command) end