Misplaced Pages

Secure Shell

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

The Secure Shell (SSH) Protocol is a cryptographic network protocol for operating network services securely over an unsecured network. Its most notable applications are remote login and command-line execution.

#380619

67-484: SSH was designed for Unix-like operating systems as a replacement for Telnet and unsecured remote Unix shell protocols, such as the Berkeley Remote Shell (rsh) and the related rlogin and rexec protocols, which all use insecure, plaintext methods of authentication, like passwords . Since mechanisms like Telnet and Remote Shell are designed to access and operate remote computers, sending

134-522: A read–eval–print loop, REPL ). Since the operating system shell is actually an application, it may easily be replaced with another similar application, for most operating systems. In addition to shells running on local systems, there are different ways to make remote systems available to local users; such approaches are usually referred to as remote access or remote administration. Initially available on multi-user mainframes , which provided text-based UIs for each active user simultaneously by means of

201-550: A genericized trademark . Some add a wildcard character to the name to make an abbreviation like "Un*x" or "*nix", since Unix-like systems often have Unix-like names such as AIX , A/UX , HP-UX , IRIX , Linux , Minix , Ultrix , Xenix , and XNU . These patterns do not literally match many system names, but are still generally recognized to refer to any UNIX system, descendant, or work-alike, even those with completely dissimilar names such as Darwin / macOS , illumos / Solaris or FreeBSD . In 2007, Wayne R. Gray sued to dispute

268-658: A shell is a computer program that exposes an operating system 's services to a human user or other programs. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer's role and particular operation. It is named a shell because it is the outermost layer around the operating system. Operating systems provide various services to their users, including file management , process management (running and terminating applications ), batch processing , and operating system monitoring and configuration. Most operating system shells are not direct interfaces to

335-432: A teletypewriter can send codes representing keystrokes to a command interpreter program running on the computer; the command interpreter parses the sequence of keystrokes and responds with an error message if it cannot recognize the sequence of characters, or it may carry out some other program action such as loading an application program, listing files, logging in a user and many others. Operating systems such as UNIX have

402-688: A text terminal connected to the mainframe via serial line or modem , remote access has extended to Unix-like systems and Microsoft Windows. On Unix-like systems, Secure Shell protocol (SSH) is usually used for text-based shells, while SSH tunneling can be used for X Window System –based graphical user interfaces (GUIs). On Microsoft Windows, Remote Desktop Protocol can be used to provide GUI remote access, and since Windows Vista , PowerShell Remote can be used for text-based remote access via WMI, RPC, and WS-Management. Most operating system shells fall into one of two categories – command-line and graphical. Command-line shells provide

469-521: A "portability" branch was formed to port OpenSSH to other operating systems. As of 2005, OpenSSH was the single most popular SSH implementation, being the default version in a large number of operating system distributions. OSSH meanwhile has become obsolete. OpenSSH continues to be maintained and supports the SSH-2 protocol, having expunged SSH-1 support from the codebase in the OpenSSH 7.6 release. SSH

536-473: A POSIX compatibility layer and are not otherwise inherently Unix systems. Many ancient UNIX systems no longer meet this definition. Broadly, any Unix-like system that behaves in a manner roughly consistent with the UNIX specification, including having a " program which manages your login and command line sessions "; more specifically, this can refer to systems such as Linux or Minix that behave similarly to

603-470: A UNIX system but have no genetic or trademark connection to the AT&;T code base. Most free/open-source implementations of the UNIX design, whether genetic UNIX or not, fall into the restricted definition of this third category due to the expense of obtaining Open Group certification, which costs thousands of dollars. Around 2001 Linux was given the opportunity to get a certification including free help from

670-577: A USB drive, without requiring installation on the client machine. Crostini on ChromeOS comes with OpenSSH by default. Setting up an SSH server in Windows typically involves enabling a feature in the Settings app. SSH is important in cloud computing to solve connectivity problems, avoiding the security issues of exposing a cloud-based virtual machine directly on the Internet. An SSH tunnel can provide

737-563: A block of ciphertext that was encrypted using what was then the standard default encryption mode, CBC . The most straightforward solution is to use CTR , counter mode, instead of CBC mode, since this renders SSH resistant to the attack. On December 28, 2014 Der Spiegel published classified information leaked by whistleblower Edward Snowden which suggests that the National Security Agency may be able to decrypt some SSH traffic. The technical details associated with such

SECTION 10

#1732772039381

804-411: A command line setting (the option -i for ssh). The ssh-keygen utility produces the public and private keys, always in pairs. SSH is typically used to log into a remote computer's shell or command-line interface (CLI) and to execute commands on a remote server. It also supports mechanisms for tunneling , forwarding of TCP ports and X11 connections and it can be used to transfer files using

871-424: A command-line interface (CLI) to the operating system, while graphical shells provide a graphical user interface (GUI). Other possibilities, although not so common, include a voice user interface and various implementations of a text-based user interface (TUI) that are not CLI, such as text-based menu systems. The relative merits of CLI- and GUI-based shells are often debated. Many computer users use both depending on

938-459: A command-line interface. For example, in Unix-like systems, the telnet program has a number of commands for controlling a link to a remote computer system. Since the commands to the program are made of the same keystrokes as the data being sent to a remote computer, some means of distinguishing the two are required. An escape sequence can be defined, using either a special local keystroke that

1005-596: A historical connection to the AT&;T codebase. Most commercial UNIX systems fall into this category. So do the BSD systems, which are descendants of work done at the University of California, Berkeley in the late 1970s and early 1980s. Some of these systems have no original AT&T code but can still trace their ancestry to AT&T designs. These systems‍—‌largely commercial in nature‍—‌have been determined by

1072-513: A historical software revision, but a method to identify backward compatibility . In 1999, developers, desiring availability of a free software version, restarted software development from the 1.2.12 release of the original SSH program, which was the last released under an open source license . This served as a code base for Björn Grönvall's OSSH software. Shortly thereafter, OpenBSD developers forked Grönvall's code and created OpenSSH , which shipped with Release 2.6 of OpenBSD. From this version,

1139-530: A large variety of shell programs with different commands, syntax and capabilities, with the POSIX shell being a baseline. Some operating systems had only a single style of command interface; commodity operating systems such as MS-DOS came with a standard command interface ( COMMAND.COM ) but third-party interfaces were also often available, providing additional features or functions such as menuing or remote program execution. Application programs may also implement

1206-555: A process were not disclosed. A 2017 analysis of the CIA hacking tools BothanSpy and Gyrfalcon suggested that the SSH protocol was not compromised. A novel man-in-the-middle attack against most current ssh implementations was discovered in 2023. It was named the Terrapin attack by its discoverers. However, the risk is mitigated by the requirement to intercept a genuine ssh session, and that

1273-500: A proposed Internet standard . The protocol specifications were later updated by the following publications: In addition, the OpenSSH project includes several vendor protocol specifications/extensions: Unix-like A Unix-like (sometimes referred to as UN*X or *nix ) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of

1340-433: A purpose-built program. Several command-line shells, such as Nushell , Xonsh, Bash (Unix shell) , and Z shell , offer command-line completion , enabling the interpreter to expand commands based on a few characters input by the user. A command-line interpreter may offer a history function, so that the user can recall earlier commands issued to the system and repeat them, possibly with some editing. Since all commands to

1407-455: A researcher at Helsinki University of Technology in Finland designed the first version of the protocol (now called SSH-1 ) prompted by a password- sniffing attack at his university network . The goal of SSH was to replace the earlier rlogin , TELNET , FTP and rsh protocols, which did not provide strong authentication nor guarantee confidentiality. He chose the port number 22 because it

SECTION 20

#1732772039381

1474-404: A secure path over the Internet, through a firewall to a virtual machine. The IANA has assigned TCP port 22, UDP port 22 and SCTP port 22 for this protocol. IANA had listed the standard TCP port 22 for SSH servers as one of the well-known ports as early as 2001. SSH can also be run using SCTP rather than TCP as the connection oriented transport layer protocol. In 1995, Tatu Ylönen ,

1541-419: A set of loosely coupled utilities. Most graphical user interfaces develop the metaphor of an "electronic desktop" , where data files are represented as if they were paper documents on a desk, and application programs similarly have graphical representations instead of being invoked by command names. Graphical shells typically build on top of a windowing system . In the case of X Window System or Wayland ,

1608-455: A single user or process at a time. Another important feature of Unix-like systems is their modularity . This means that the operating system is made up of many small, interchangeable components that can be added or removed as needed. This makes it easy to customize the operating system to suit the needs of different users or environments. The Open Group owns the UNIX trademark and administers

1675-486: A variety of proprietary systems were developed based on it, including AIX , HP-UX , IRIX , SunOS , Tru64 , Ultrix , and Xenix . These largely displaced the proprietary clones. Growing incompatibility among these systems led to the creation of interoperability standards, including POSIX and the Single UNIX Specification . Various free, low-cost, and unrestricted substitutes for UNIX emerged in

1742-462: Is OpenSSH , released in 1999 as open-source software by the OpenBSD developers. Implementations are distributed for all types of operating systems in common use, including embedded systems. SSH applications are based on a client–server architecture, connecting an SSH client instance with an SSH server . SSH operates as a layered protocol suite comprising three principal hierarchical components:

1809-487: Is a good example of the former sort of application. LiteStep and Emerge Desktop are good examples of the latter. Interoperability programmes and purpose-designed software lets Windows users use equivalents of many of the various Unix-based GUIs discussed below, as well as Macintosh. An equivalent of the OS/2 Presentation Manager for version 3.0 can run some OS/2 programmes under some conditions using

1876-475: Is a protocol that can be used for many applications across many platforms including most Unix variants ( Linux , the BSDs including Apple 's macOS , and Solaris ), as well as Microsoft Windows . Some of the applications below may require features that are only available or compatible with specific SSH clients or servers. For example, using the SSH protocol to implement a VPN is possible, but presently only with

1943-614: Is between telnet (port 23) and ftp (port 21). Ylönen released his implementation as freeware in July 1995, and the tool quickly gained in popularity. Towards the end of 1995, the SSH user base had grown to 20 000 users in fifty countries. In December 1995, Ylönen founded SSH Communications Security to market and develop SSH. The original version of the SSH software used various pieces of free software , such as GNU libgmp , but later versions released by SSH Communications Security evolved into increasingly proprietary software . It

2010-471: Is never passed on but always interpreted by the local system. The program becomes modal, switching between interpreting commands from the keyboard or passing keystrokes on as data to be processed. A feature of many command-line shells is the ability to save sequences of commands for re-use. A data file can contain sequences of commands which the CLI can be made to follow as if typed in by a user. Special features in

2077-399: Is not writable by anything apart from the owner and root. When the public key is present on the remote end and the matching private key is present on the local end, typing in the password is no longer required. However, for additional security the private key itself can be locked with a passphrase. The private key can also be looked for in standard places, and its full path can be specified as

Secure Shell - Misplaced Pages Continue

2144-521: The Apache web server and the Bash shell, are also designed to be used on Unix-like systems. One of the key features of Unix-like systems is their ability to support multiple users and processes simultaneously. This allows users to run multiple programs at the same time and to share resources such as memory and disk space. This is in contrast to many older operating systems, which were designed to only support

2211-530: The Open Group to meet the Single UNIX Specification and are allowed to carry the UNIX name. Most such systems are commercial derivatives of the System V code base in one form or another, although Apple macOS 10.5 and later is a BSD variant that has been certified, and EulerOS and Inspur K-UX are Linux distributions that have been certified. A few other systems (such as IBM z/OS) earned the trademark through

2278-431: The OpenSSH server and client implementation. The Secure Shell protocols are used in several file transfer mechanisms. The SSH protocol has a layered architecture with three separate components: This open architecture provides considerable flexibility, allowing the use of SSH for a variety of purposes beyond a secure shell. The functionality of the transport layer alone is comparable to Transport Layer Security (TLS);

2345-577: The OpenSSH source code to Windows and in Windows 10 version 1709 , an official Win32 port of OpenSSH is now available. File managers for UNIX-like systems (e.g. Konqueror ) can use the FISH protocol to provide a split-pane GUI with drag-and-drop. The open source Windows program WinSCP provides similar file management (synchronization, copy, remote delete) capability using PuTTY as a back-end. Both WinSCP and PuTTY are available packaged to run directly off

2412-560: The Single UNIX Specification . A Unix-like application is one that behaves like the corresponding Unix command or shell . Although there are general philosophies for Unix design, there is no technical standard defining the term, and opinions can differ about the degree to which a particular operating system or application is Unix-like. Some well-known examples of Unix-like operating systems include Linux and BSD . These systems are often used on servers as well as on personal computers and other devices. Many popular applications, such as

2479-911: The Thompson shell in the first version of Unix. While simpler than the Multics shell, it contained some innovative features, which have been carried forward in modern shells, including the use of < and > for input and output redirection . The graphical shell first appeared in Douglas Engelbart ’s NLS system, demonstrated in December, 1968 at the Fall Joint Computer Conference in San Francisco, in what has been called The Mother of All Demos . Engelbart’s colleagues at Stanford Research Institute brought

2546-438: The transport layer provides server authentication, confidentiality, and integrity; the user authentication protocol validates the user to the server; and the connection protocol multiplexes the encrypted tunnel into multiple logical communication channels. SSH uses public-key cryptography to authenticate the remote computer and allow it to authenticate the user, if necessary. SSH may be used in several methodologies. In

2613-514: The 1980s and 1990s, including 4.4BSD , Linux , and Minix . Some of these have in turn been the basis for commercial "Unix-like" systems, such as BSD/OS and macOS . Several versions of (Mac) OS X/macOS running on Intel-based Mac computers have been certified under the Single UNIX Specification . The BSD variants are descendants of UNIX developed by the University of California at Berkeley, with UNIX source code from Bell Labs . However,

2680-443: The 95 and NT types at least through Windows XP. The interfaces of Windows versions 1 and 2 were markedly different. Desktop applications are also considered shells, as long as they use a third-party engine. Likewise, many individuals and developers dissatisfied with the interface of Windows Explorer have developed software that either alters the functioning and appearance of the shell or replaces it entirely. WindowBlinds by StarDock

2747-621: The BSD code base has evolved since then, replacing all the AT&T code. Since the BSD variants are not certified as compliant with the Single UNIX Specification, they are referred to as "UNIX-like" rather than "UNIX". Dennis Ritchie , one of the original creators of Unix, expressed his opinion that Unix-like systems such as Linux are de facto Unix systems. Eric S. Raymond and Rob Landley have suggested that there are three kinds of Unix-like systems: Those systems with

Secure Shell - Misplaced Pages Continue

2814-580: The CLI may apply when it is carrying out these stored instructions. Such batch files (script files) can be used repeatedly to automate routine operations such as initializing a set of programs when a system is restarted. Batch mode use of shells usually involves structures, conditionals, variables, and other elements of programming languages; some have the bare essentials needed for such a purpose, others are very sophisticated programming languages in and of themselves. Conversely, some programming languages can be used interactively from an operating system shell or in

2881-504: The Microsoft Windows operating system use the Windows shell as their shell. Windows Shell provides desktop environment , start menu , and task bar , as well as a graphical user interface for accessing the file management functions of the operating system. Older versions also include Program Manager , which was the shell for the 3.x series of Microsoft Windows, and which in fact shipped with later versions of Windows of both

2948-459: The OS/2 environmental subsystem in versions of Windows NT. "Shell" is also used loosely to describe application software that is "built around" a particular component, such as web browsers and email clients, in analogy to the shells found in nature. Indeed, the (command-line) shell encapsulates the operating system kernel . These are also sometimes referred to as "wrappers". In expert systems ,

3015-807: The POSIX chair Andrew Josey for the symbolic price of one dollar. There have been some activities to make Linux POSIX-compliant, with Josey having prepared a list of differences between the POSIX standard and the Linux Standard Base specification, but in August 2005, this project was shut down because of missing interest at the LSB work group. Some non-Unix-like operating systems provide a Unix-like compatibility layer , with varying degrees of Unix-like functionality. Other means of Windows-Unix interoperability include: Shell (computing) In computing ,

3082-481: The Single UNIX Specification, with the "UNIX" name being used as a certification mark . They do not approve of the construction "Unix-like", and consider it a misuse of their trademark. Their guidelines require "UNIX" to be presented in uppercase or otherwise distinguished from the surrounding text, strongly encourage using it as a branding adjective for a generic word such as "system", and discourage its use in hyphenated phrases. Other parties frequently treat "Unix" as

3149-712: The associated SSH File Transfer Protocol (SFTP) or Secure Copy Protocol (SCP). SSH uses the client–server model . An SSH client program is typically used for establishing connections to an SSH daemon , such as sshd, accepting remote connections. Both are commonly present on most modern operating systems , including macOS , most distributions of Linux , OpenBSD , FreeBSD , NetBSD , Solaris and OpenVMS . Notably, versions of Windows prior to Windows 10 version 1709 do not include SSH by default, but proprietary , freeware and open source versions of various levels of complexity and completeness did and do exist (see Comparison of SSH clients ). In 2018 Microsoft began porting

3216-495: The attack is restricted in its scope, fortuitously resulting mostly in failed connections. The ssh developers have stated that the major impact of the attack is to degrade the keystroke timing obfuscation features of ssh. The vulnerability was fixed in OpenSSH 9.6, but requires both client and server to be upgraded for the fix to be fully effective. The following RFC publications by the IETF "secsh" working group document SSH-2 as

3283-432: The authentication tokens (e.g. username and password ) for this access to these computers across a public network in an unsecured way, poses a great risk of 3rd parties obtaining the password and achieving the same level of access to the remote system as the telnet user. Secure Shell mitigates this risk through the use of encryption mechanisms that are intended to hide the contents of the transmission from an observer, even if

3350-636: The concept to the Xerox Palo Alto Research Center (PARC), where it appeared on the Alto , introduced in 1973. From there the idea spread to Niklaus Wirth ’s Lilith in 1980, and the Apple Lisa in 1983, then became ubiquitous. A command-line interface (CLI) is an operating system shell that uses alphanumeric characters typed on a keyboard to provide instructions and data to the operating system, interactively. For example,

3417-429: The idea of "using commands somehow like a programming language," and coined the term shell to describe it. In a 1965 document, the shell is defined as "a common procedure called automatically by the supervisor whenever a user types in some message at his console, at a time when he has no other process in active execution under console control. This procedure acts as an interface between console messages and subroutine [in

SECTION 50

#1732772039381

3484-528: The observer has access to the entire data stream. Finnish computer scientist Tatu Ylönen designed SSH in 1995 and provided an implementation in the form of two commands, ssh and slogin , as secure replacements for rsh and rlogin , respectively. Subsequent development of the protocol suite proceeded in several developer groups, producing several variants of implementation. The protocol specification distinguishes two major versions, referred to as SSH-1 and SSH-2. The most commonly implemented software stack

3551-598: The operating system had to be typed by the user, short command names and compact systems for representing program options were common. Short names were sometimes hard for a user to recall, and early systems lacked the storage resources to provide a detailed on-line user instruction guide. A graphical user interface (GUI) provides means for manipulating programs graphically, by allowing for operations such as opening, closing, moving and resizing windows , as well as switching focus between windows. Graphical shells may be included with desktop environments or come separately, even as

3618-544: The previous standard like 3-des . New features of SSH-2 include the ability to run any number of shell sessions over a single SSH connection. Due to SSH-2's superiority and popularity over SSH-1, some implementations such as libssh (v0.8.0+), Lsh and Dropbear eventually supported only the SSH-2 protocol. In January 2006, well after version 2.1 was established, RFC   4253 specified that an SSH server supporting 2.0 as well as prior versions should identify its protocol version as 1.99. This version number does not reflect

3685-460: The protocol. A fix known as SSH Compensation Attack Detector was introduced into most implementations. Many of these updated implementations contained a new integer overflow vulnerability that allowed attackers to execute arbitrary code with the privileges of the SSH daemon, typically root. In January 2001 a vulnerability was discovered that allows attackers to modify the last block of an IDEA -encrypted session. The same month, another vulnerability

3752-448: The public key is placed on all computers that must allow access to the owner of the matching private key, which the owner keeps private. While authentication is based on the private key, the key is never transferred through the network during authentication. SSH only verifies that the same person offering the public key also owns the matching private key. In all versions of SSH it is important to verify unknown public keys , i.e. associate

3819-408: The public keys with identities , before accepting them as valid. Accepting an attacker's public key without validation will authorize an unauthorized attacker as a valid user. On Unix-like systems, the list of authorized public keys is typically stored in the home directory of the user that is allowed to log in remotely, in the file ~/.ssh/authorized_keys . This file is respected by SSH only if it

3886-561: The shell consists of an X window manager or a Wayland compositor , respectively, as well as of one or multiple programs providing the functionality to start installed applications, to manage open windows and virtual desktops, and often to support a widget engine. In the case of macOS , Quartz Compositor acts as the windowing system, and the shell consists of the Finder , the Dock , SystemUIServer, and Mission Control . Modern versions of

3953-431: The simplest manner, both ends of a communication channel use automatically generated public-private key pairs to encrypt a network connection, and then use a password to authenticate the user. When the public-private key pair is generated by the user manually, the authentication is essentially performed when the key pair is created, and a session may then be opened automatically without a password prompt. In this scenario,

4020-508: The status of UNIX as a trademark, but lost his case, and lost again on appeal, with the court upholding the trademark and its ownership. "Unix-like" systems started to appear in the late 1970s and early 1980s. Many proprietary versions, such as Idris (1978), UNOS (1982), Coherent (1983), and UniFlex (1985), aimed to provide businesses with the functionality available to academic users of UNIX. When AT&T allowed relatively inexpensive commercial binary sublicensing of UNIX in 1979,

4087-451: The supervisor]." This system was first implemented by Glenda Schroeder and an unnamed man from General Electric . Multics also introduced the active function , a key concept in all later shells. This is defined as a string... which is replaced by a character string return value before the command line containing it is executed. Active functions are often used... to implement command-language macros. In 1971, Ken Thompson developed

SECTION 60

#1732772039381

4154-566: The system or a user process. The purpose of such a procedure is to create a medium of exchange into which one could activate any procedure, as if it were called from the inside of another program . Hereafter, for simplification, we shall refer to that procedure as the "SHELL". Louis Pouzin, The SHELL: A Global Tool for Calling and Chaining Procedures in the System In 1964, for the Multics operating system, Louis Pouzin conceived

4221-499: The task to be performed. Early interactive systems provided a simple command-line interpreter as part of the resident monitor . This interpreter might be called by different names, such as COMCON on DEC TOPS-10 systems. The interpreter would execute one of a number of predefined commands, one of which would be to run a user program. Common commands would log the user on and off the system, allocate, free, and manipulate devices and files, and query various pieces of information about

4288-440: The underlying kernel , even if a shell communicates with the user via peripheral devices attached to the computer directly. Shells are actually special applications that use the kernel API in just the same way as it is used by other application programs. A shell manages the user–system interaction by prompting users for input, interpreting their input, and then handling output from the underlying operating system (much like

4355-522: The user-authentication layer is highly extensible with custom authentication methods; and the connection layer provides the ability to multiplex many secondary sessions into a single SSH connection, a feature comparable to BEEP and not available in TLS. In 1998, a vulnerability was described in SSH 1.5 which allowed the unauthorized insertion of content into an encrypted SSH stream due to insufficient data integrity protection from CRC-32 used in this version of

4422-463: Was discovered that allowed a malicious server to forward a client authentication to another server. Since SSH-1 has inherent design flaws which make it vulnerable, it is now generally considered obsolete and should be avoided by explicitly disabling fallback to SSH-1. Most modern servers and clients support SSH-2. In November 2008, a theoretical vulnerability was discovered for all versions of SSH which allowed recovery of up to 32 bits of plaintext from

4489-653: Was estimated that by 2000 the number of users had grown to 2 million. In 2006, after being discussed in a working group named "secsh", a revised version of the SSH protocol, SSH-2 was adopted as a standard. This version offers improved security and new features, but is not compatible with SSH-1. For example, it introduces new key-exchange mechanisms like Diffie–Hellman key exchange , improved data integrity checking via message authentication codes like MD5 or SHA-1 , which can be negotiated between client and server. SSH-2 also adds stronger encryption methods like AES which eventually replaced weaker and compromised ciphers from

#380619