Lines Matching full:ssh
11 SSHHost: a remote machine with a ssh access
46 This class represents a remote machine controlled through an ssh
57 serial console available then ordinary SSH-based commands will
82 Construct an ssh command with proper args for this host.
85 @param options: SSH options
86 @param alive_interval: SSH Alive interval.
87 @param alive_count_max: SSH AliveCountMax.
88 @param connection_attempts: SSH ConnectionAttempts
116 Prepend the command for the client with information about the ssh
119 @param command: the ssh command to be executed.
178 'TLS' if use_tls else 'SSH', command, stack)
188 # If TLS fails for unknown reason, we will revert to normal ssh.
190 "Unexpected TLS cmd failed. Reverting to SSH.\n %s", e)
210 # ssh_counter records the outcome of each ssh invocation
212 ssh_counter = metrics.Counter('chromeos/autotest/ssh/calls')
221 run_counter = metrics.Counter('chromeos/autotest/ssh/runs')
227 # error 255: if a simple retry doesn't work, kill the ssh main
232 # Ignore ssh command timeout, even though it could be a timeout due
263 if re.search(r'^ssh: .*: Name or service not known',
274 # Record the outcome of the ssh invocation.
283 logging.debug('retrying ssh command after %s',
304 # The outcomes of ssh invocations have been recorded. Now record
312 # from stuff sent through the SSH connection), so we have the
317 if re.search(r'^ssh: connect to host .* port .*: '
321 "ssh timed out: %r" % original_cmd.strip(), result)
323 msg = "ssh permission denied"
360 @param connect_timeout: ssh connection timeout (in seconds)
361 @param options: string with additional ssh command options
363 @param ignore_timeout: bool True if SSH command timeouts should be
366 probable ssh failure (error 255 or timeout). When true,
368 time after restarting the ssh main connection. Use only for
370 ssh failure" occurs, we cannot tell if the command executed
374 @raises AutoservSSHTimeout: ssh connection has timed out
384 with metrics.SecondsTimer('chromeos/autotest/ssh/main_ssh_time',
524 """Setup SSH Key"""
525 logging.debug('Performing SSH key setup on %s as %s.',
534 host.sendline('mkdir -p ~/.ssh')
536 host.sendline('chmod 700 ~/.ssh')
538 host.sendline("echo '%s' >> ~/.ssh/authorized_keys; " %
541 host.sendline('chmod 600 ~/.ssh/authorized_keys')
545 logging.debug('SSH key setup complete.')
548 logging.debug('SSH key setup has failed.')
556 """Setup SSH"""