Files transferred over shell protocol

Last updated

Files transferred over Shell protocol (FISH) is a network protocol that uses Secure Shell (SSH) or Remote Shell (RSH) to transfer files between computers and manage remote files.

Contents

The advantage of FISH is that all it requires on the server-side is an SSH or RSH implementation, Unix shell, and a set of standard Unix utilities (like ls, cat or dd—unlike other methods of remote access to files via a remote shell, scp for example, which requires scp on the server side). Optionally, there can be a special FISH server program (called start_fish_server) on the server, which executes FISH commands instead of Unix shell and thus speeds up operations.

The protocol was designed by Czech Linux Kernel Hacker, Pavel Machek, in 1998 for the Midnight Commander software tool. [1]

Protocol messages

Client sends text requests of the following form:

#FISH_COMMAND arguments... equivalent shell commands, which may be multi-line

Fish commands are all defined, shell equivalents may vary. Fish commands always have priority: the server is expected to execute a fish command if it understands it. If it does not, however, it can try to execute a shell command. When there is no special server program, Unix shell ignores the fish command as a comment and executes the equivalent shell command(s).

Server replies are multi-line, but always end with

### xyz<optional text>

line. ### is a prefix to mark this line, xyz is the return code. Return codes are a superset to those used in FTP. The codes 000 and 001 are special, their meaning depends on presence of server output before the end line.

Session initiation

The client initiates SSH or RSH connection with echo FISH:;/bin/sh as the command executed on remote machine. This should make it possible for the server to distinguish FISH connections from normal RSH or SSH.

The first two commands sent to the server are FISH and VER to negotiate FISH protocol, its version and extensions.

#FISH echo; start_fish_server; echo '### 200'
#VER 0.0.2 <feature1> <feature2> <...> echo '### 000'

The server may reply to VER command with a lines like

VER 0.0.0 <feature2> <...> ### 200

which indicates supported version of the FISH protocol and supported extensions.

Implementations

See also

Related Research Articles

<span class="mw-page-title-main">Konqueror</span> Web browser and file manager

Konqueror is a free and open-source web browser and file manager that provides web access and file-viewer functionality for file systems. It forms a core part of the KDE Software Compilation. Developed by volunteers, Konqueror can run on most Unix-like operating systems. The KDE community licenses and distributes Konqueror under GNU GPL-2.0-or-later.

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.

SOCKS is an Internet protocol that exchanges network packets between a client and server through a proxy server. SOCKS5 optionally provides authentication so only authorized users may access a server. Practically, a SOCKS server proxies TCP connections to an arbitrary IP address, and provides a means for UDP packets to be forwarded. A SOCKS server accepts incoming client connection on TCP port 1080, as defined in RFC 1928.

In computing, the SSH File Transfer Protocol is a network protocol that provides file access, file transfer, and file management over any reliable data stream. It was designed by the Internet Engineering Task Force (IETF) as an extension of the Secure Shell protocol (SSH) version 2.0 to provide secure file transfer capabilities, and is seen as a replacement of File Transfer Protocol (FTP) due to superior security. The IETF Internet Draft states that, even though this protocol is described in the context of the SSH-2 protocol, it could be used in a number of different applications, such as secure file transfer over Transport Layer Security (TLS) and transfer of management information in VPN applications.

cURL is a computer software project providing a library (libcurl) and command-line tool (curl) for transferring data using various network protocols. The name stands for "Client for URL".

<span class="mw-page-title-main">KIO</span> System library

KIO is a system library incorporated into KDE Frameworks and KDE Software Compilation 4. It provides access to files, web sites and other resources through a single consistent API. Applications, such as Konqueror and Dolphin, which are written using this framework, can operate on files stored on remote servers in exactly the same way as they operate on those stored locally, effectively making KDE network-transparent. This allows for an application like Konqueror to be both a file manager as well as a web browser.

Secure copy protocol (SCP) is a means of securely transferring computer files between a local host and a remote host or between two remote hosts. It is based on the Secure Shell (SSH) protocol. "SCP" commonly refers to both the Secure Copy Protocol and the program itself.

<span class="mw-page-title-main">PuTTY</span> Free and open-source terminal emulator, serial console and network file transfer application

PuTTY is a free and open-source terminal emulator, serial console and network file transfer application. It supports several network protocols, including SCP, SSH, Telnet, rlogin, and raw socket connection. It can also connect to a serial port. The name "PuTTY" has no official meaning.

The Berkeley r-commands are a suite of computer programs designed to enable users of one Unix system to log in or issue commands to another Unix computer via TCP/IP computer network. The r-commands were developed in 1982 by the Computer Systems Research Group at the University of California, Berkeley, based on an early implementation of TCP/IP.

<span class="mw-page-title-main">Far Manager</span> File and archive manager for Microsoft Windows

Far Manager is an orthodox file manager for Microsoft Windows and is a clone of Norton Commander. Far Manager uses the Win32 console and has a keyboard-oriented user interface.

sftp is a command-line interface client program to transfer files using the SSH File Transfer Protocol (SFTP), which runs inside the encrypted Secure Shell connection.

The remote shell (rsh) is a command-line computer program that can execute shell commands as another user, and on another computer across a computer network.

<span class="mw-page-title-main">WinSCP</span> File transfer software for Windows

WinSCP is a file manager, SSH File Transfer Protocol (SFTP), File Transfer Protocol (FTP), WebDAV, Amazon S3, and secure copy protocol (SCP) client for Microsoft Windows. The WinSCP project has released its source code on GitHub under an open source license, while the program itself is distributed as proprietary freeware.

The following tables compare general and technical information for a number of notable file managers.

<span class="mw-page-title-main">Dired</span>

Dired is a computer program for editing file system directories. It typically runs inside the Emacs text editor as a specialized mode, though standalone versions have been written. Dired was the first file manager, or visual editor of file system information. The first version of Dired was written as a stand-alone program independently in 1972 by Dave Lebling at Project MAC, and circa 1974 by Stan Kugell at the Stanford Artificial Intelligence Laboratory (SAIL). It was incorporated into GNU Emacs from the earliest versions, and re-implemented in C and C++ on other operating systems.

<span class="mw-page-title-main">SSHFS</span>

SSHFS is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0.

<span class="mw-page-title-main">GNU Emacs</span> GNU version of the Emacs text editor

GNU Emacs is a text editor and suite of free software tools. Its development began in 1984 by GNU Project founder Richard Stallman, based on the Emacs editor developed for Unix operating systems. GNU Emacs has been a central component of the GNU project and a flagship project of the free software movement.

An SSH server is a software program which uses the Secure Shell protocol to accept connections from remote computers. SFTP/SCP file transfers and remote terminal connections are popular use cases for an SSH server.

ssh-keygen is a standard component of the Secure Shell (SSH) protocol suite found on Unix, Unix-like and Microsoft Windows computer systems used to establish secure shell sessions between remote computers over insecure networks, through the use of various cryptographic techniques. The ssh-keygen utility is used to generate, manage, and convert authentication keys.

<span class="mw-page-title-main">OpenSSH</span> Set of computer programs providing encrypted communication sessions

OpenSSH is a suite of secure networking utilities based on the Secure Shell (SSH) protocol, which provides a secure channel over an unsecured network in a client–server architecture.

References

  1. File: Fish.c - via Midnight Commander Official Repository
  2. "Mc/Fish.c at master · MidnightCommander/Mc". GitHub .
  3. "Feature: Consider porting FISH(FIle transfer over SHell filesystem) from Midnight Commander · Issue #1819 · elfmz/Far2l". GitHub .
  4. "LFTP/SRC/Fish.cc at master · lavv17/LFTP". GitHub .
  5. "Kio-extras/Fish/Fish.CPP at master · KDE/Kio-extras". GitHub .
  6. related commit in Emacs
  7. "Re: Tramp's fish method".