Difference between revisions of "OpenSSH"

From wikieduonline
Jump to navigation Jump to search
 
(2 intermediate revisions by one other user not shown)
Line 4: Line 4:
  
 
The OpenSSH suite includes the following command-line utilities and daemons:
 
The OpenSSH suite includes the following command-line utilities and daemons:
* <code>[[ssh (OpenSSH client)|ssh]]</code>, ssh client and TCP secure replacement for {{Mono|rlogin}}, {{Mono|rsh}} and {{Mono|[[telnet]]}} to allow shell access to a remote machine.
+
* <code>[[ssh (OpenSSH client)|ssh]]</code>, [[ssh client]] and TCP secure replacement for <code>[[rlogin]]</code>, <code>[[rsh]]</code> and <code>[[telnet]]</code> to allow shell access to a remote machine.
 
* <code>[[scp]]</code>, a replacement for <code>[[rcp]]</code>
 
* <code>[[scp]]</code>, a replacement for <code>[[rcp]]</code>
 
* <code>sftp</code>, a replacement for <code>[[ftp]]</code> to copy files between computers
 
* <code>sftp</code>, a replacement for <code>[[ftp]]</code> to copy files between computers
Line 57: Line 57:
 
* [[Damien Miller]]
 
* [[Damien Miller]]
 
* [[Key Revocation Lists (KRL)]]
 
* [[Key Revocation Lists (KRL)]]
 +
* [[AWS EC2 Instance Connect]] (Jun 2019)
  
 
== See also ==
 
== See also ==

Latest revision as of 13:13, 20 October 2022

OpenSSH is a popular suite of software utilities implementing Secure Shell (SSH) protocol. OpenSSH includes the ability to set up a TCP secured channel and it is widely use as a replacement for not secured telnet and secure replacement of file transfers such as rcp and ftp. OpenSSH offers a great number of features including ssh session multiplexing. [1][2]


The OpenSSH suite includes the following command-line utilities and daemons:

  • ssh, ssh client and TCP secure replacement for rlogin, rsh and telnet to allow shell access to a remote machine.
  • scp, a replacement for rcp
  • sftp, a replacement for ftp to copy files between computers
  • sshd, the SSH server daemon which allows shell access and file transfers to a remote machine.
  • ssh-keygen, a tool to inspect and generate the RSA, DSA and Elliptic Curve keys that are used for user and host authentication
  • ssh-keyscan, which scans a list of hosts and collects their public keys
  • ssh-agent and ssh-add, utilities to ease authentication by holding keys ready and avoid the need to enter passphrases every time they are used
  • ssh-copy-id, copy local keys to remote machine.

Readings[edit]

Config[edit]

ssh clients[edit]

OpenSSH includes an ssh client:ssh. Others clients are available such us PuTTY, mosh, paramiko and autossh[3].

autossh[4] main feature not include in OpenSSH ssh client is the capability to monitor an ssh connection and restart it if necessary.

  • Loop waiting to connect to server: AUTOSSH_POLL=5 AUTOSSH_GATETIME=0 autossh -M 0 -o ServerAliveInterval=5 -o ServerAliveCountMax=1 YOUR_SERVER_NAME_OR_IP

Ssh clients in Linux are frequently executed inside a terminal or using any kind of terminal multiplexer such as tmux or screen.

Activities[edit]

Basic[edit]

Intermediate[edit]

  • Learn about different client connection options, such us: -oBatchMode=yes or -o ConnectTimeout=2[8]
  • Connect to remote server temporarily turning off host key checking, (security implications): ssh -oStrictHostKeyChecking=no SERVER_NAME

Advanced[edit]

  1. Read ssh documentation about multiplexing https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing and its implementation details: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.mux?annotate=HEAD
  2. Configure ssh session multiplexing
  3. Use ProxyJump directive to connect using a "Jump Server"[9]
  4. Run a shell script on a remote machine using ssh: ssh root@MachineB 'bash -s' < local_script.sh[10]. See also: parallel
  5. Read https://github.com/openssh/openssh-portable source code
  6. Read OpenSSH changelog

Related terms[edit]

See also[edit]

Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

Original source: https://en.wikiversity.org/wiki/OpenSSH

Advertising: