Sha256: 6fad9f201a57a17a9dbb5050131b727be1c64132b392b1076c5b82806a42e701
Contents?: true
Size: 1021 Bytes
Versions: 5
Compression:
Stored size: 1021 Bytes
Contents
class TestLab class Container module SSH # ZTK:SSH object # # Returns a *ZTK:SSH* class instance configured for this container. # # @return [ZTK::SSH] An instance of ZTK::SSH configured for this # container. def ssh(options={}) self.node.container_ssh(self, options) end # Returns text suitable for use in an SSH configuration file # # @return [String] SSH configuration text blob. def ssh_config identities = [self.users.map(&:identity), self.node.identity].flatten.compact.uniq output = <<-EOF #{ZTK::Template.do_not_edit_notice(:message => %(TestLab "#{self.id}" SSH Configuration))} Host #{self.id} HostName #{self.ip} Port 22 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no ForwardAgent yes IdentitiesOnly yes EOF identities.each do |identity| output += " IdentityFile #{identity}\n" end output end end end end
Version data entries
5 entries across 5 versions & 1 rubygems