HOME

TheInfoList



OR:

Files transferred over Shell protocol (FISH) is a network
protocol Protocol may refer to: Sociology and politics * Protocol (politics), a formal agreement between nation states * Protocol (diplomacy), the etiquette of diplomacy and affairs of state * Etiquette, a code of personal behavior Science and technolog ...
that uses
Secure Shell The Secure Shell Protocol (SSH) 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. SSH applications are based on a ...
(SSH) or
Remote Shell 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. The remote system to which ''rsh'' connects runs the ''rsh'' daemon (rshd). The daemon ...
(RSH) to transfer files between computers and manage remote files. The advantage of FISH is that all it requires on the server-side is an SSH or RSH implementation,
Unix shell A Unix shell is a command-line Interpreter (computing), interpreter or shell (computing), shell that provides a command line user interface for Unix-like operating systems. The shell is both an interactive command language and a scripting langua ...
, and a set of standard
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
utilities (like ls,
cat The cat (''Felis catus'') is a domestic species of small carnivorous mammal. It is the only domesticated species in the family Felidae and is commonly referred to as the domestic cat or house cat to distinguish it from the wild members of ...
or dd—unlike other methods of remote access to files via a remote shell,
scp SCP may refer to: Organizations Political parties * Soviet Communist Party, the leading political party in the former Soviet Union * Syrian Communist Party * Sudanese Communist Party * Scottish Christian Party Companies * Seattle Computer Produ ...
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 GNU Midnight Commander (also known as mc, the command used to start it, and as mouseless commander in older versions) is a free cross-platform orthodox file manager. It was started by Miguel de Icaza in 1994 as a clone of the then-popular Nor ...
software tool.File: ''Fish.c'' - via Midnight Commander Official Repository
/ref>


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 File Transfer Protocol (FTP) is a standard communication protocol used for the transfer of computer files from a server to a client on a computer network. FTP is built on a client–server model architecture using separate control and data ...
. 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 <...> echo '### 000' The server may reply to VER command with a lines like VER 0.0.0 <...> ### 200 which indicates supported version of the FISH protocol and supported extensions.


Implementations

*
Midnight Commander GNU Midnight Commander (also known as mc, the command used to start it, and as mouseless commander in older versions) is a free cross-platform orthodox file manager. It was started by Miguel de Icaza in 1994 as a clone of the then-popular Nor ...
*
Lftp lftp is a command-line program client for several file transfer protocols. lftp is designed for Unix and Unix-like operating systems. It was developed by Alexander Lukyanov, and is distributed under the GNU General Public License. lftp can t ...
*fish://
KDE KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that allow collaborative work on this kind of software. Well-known products include the ...
kioslave (with
konqueror Konqueror is a free and open-source web browser and file manager that provides web access and file-viewer functionality for file systems (such as local files, files on a remote FTP server and files in a disk image). It forms a core part of ...
,
Krusader Krusader is an advanced orthodox file manager for KDE and other desktops in the Unix world. It is similar to the console-based GNU Midnight Commander, GNOME Commander for the GNOME desktop environment, or Total Commander for Windows, all of wh ...
or
Dolphin A dolphin is an aquatic mammal within the infraorder Cetacea. Dolphin species belong to the families Delphinidae (the oceanic dolphins), Platanistidae (the Indian river dolphins), Iniidae (the New World river dolphins), Pontoporiidae (the ...
) * ''tramp-fish.el'' implemented it in
Emacs TRAMP Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, se ...
(but migh
have been thrown away
if nobody needed it); Emacs TRAMP in overall has similar goals to FISH: remote access to files through a remote Unix shell.


See also

*
SSHFS In computing, SSHFS (SSH Filesystem) 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 ...
*
SSH File Transfer Protocol In computing, the SSH File Transfer Protocol (also known as Secure File Transfer Protocol or SFTP) is a network protocol that provides file access, file transfer, and file management over any reliable data stream. It was designed by the Internet E ...


References


External links


README.fish from Midnight Commander
{{DEFAULTSORT:Files Transferred Over Shell Protocol Network file transfer protocols