• Home
  • Raw
  • Download

Lines Matching full:ssh

53 # Ssh returns status 255 when it encounters errors in its own code.  Otherwise
55 # possibly 255. Here we assume that 255 indicates only ssh errors. This may
59 # SSH default known_hosts filepath.
60 KNOWN_HOSTS_PATH = os.path.expanduser('~/.ssh/known_hosts')
71 """Raised when SSH connection has failed."""
80 # indicates why SSH failed so this might be the best we can do.
197 """Creates a list of SSH connection options.
202 a value so that the SSH default value will be used.
206 resulting arguments are passed into an SSH call.
212 A list of arguments to pass to SSH.
231 `ssh-keygen -R` doesn't work on bind mounted files as they can only
239 to the standard SSH known_hosts file path.
242 cros_build_lib.RunCommandError if ssh-keygen fails.
244 # `ssh-keygen -R` creates a backup file to retain the old 'known_hosts'
246 # files created by us and `ssh-keygen -R` are deleted afterwards.
255 cros_build_lib.run(['ssh-keygen', '-R', host, '-f', temp_file], quiet=True)
260 """Represent the information required to define an SSH tunnel."""
273 """Return the port forwarding spec for the `ssh` command."""
294 port: The ssh port of the test machine to connect to.
295 username: The ssh login username (default: root).
296 private_key: The identify file to pass to `ssh -i` (default: testing_rsa).
326 cmd = ['ssh']
337 """Returns the ssh command that can be used to connect to the device
340 connect_settings: dict of additional ssh options
343 ['ssh', '...', 'user@host']
353 """Run a sh command on the remote device through ssh.
358 connect_settings: The SSH connect settings to use.
360 returncode. This does not cover the case where the ssh command
362 ssh_error_ok: Does not throw an exception when the ssh command itself
370 or 255 if ssh encountered an error (could not connect, connection
375 SSHConnectionError when ssh command error is not ignored through
381 # Force English SSH messages. SSHConnectionError.IsKnownHostsMismatch()
423 """Establishes a SSH tunnel to the remote device as a background process.
430 connect_settings: The SSH connect settings to use.
457 If rebooting is True, uses a SSH connection with a short timeout,
460 If rebooting is True and an ssh error occurs, None is returned.
463 # In tests SSH seems to be waiting rather longer than would be expected
489 ssh errors occur, the device has likely not booted and False is
624 # SSH login shell.
661 """Run a local command and pipe it to a remote sh command over ssh.
707 """Handling basic SSH communication with a remote device."""
719 port: The ssh port of the device.
720 username: The ssh login username.
724 connect_settings: Default SSH connection settings.
725 private_key: The identify file to pass to `ssh -i`.
735 self.tempdir = osutils.TempDir(prefix='ssh-tmp')
765 # If the hostname is the name of a "Host" entry in ~/.ssh/config,
766 # it might be ssh-able but not pingable.
767 # If the hostname is truly bogus, ssh will fail immediately, so
769 logging.info('Hostname "%s" not found, falling through to ssh',
791 """Sets up the SSH connection and internal state."""
1091 """Cat a file and pipe over SSH."""
1104 SSHConnectionError when error occurs during SSH connection.
1210 ssh errors occur, the device has likely not booted and False is
1232 """Basic commands to interact with a ChromiumOS device over SSH connection."""