nbdkit-ssh-plugin(1) | NBDKIT | nbdkit-ssh-plugin(1) |
nbdkit-ssh-plugin - access disk images over the SSH protocol
nbdkit ssh host=HOST [path=]PATH [compression=true] [config=CONFIG_FILE] [create=true] [create-mode=MODE] [create-size=SIZE] [identity=FILENAME] [known-hosts=FILENAME] [password=PASSWORD|-|+FILENAME] [port=PORT] [timeout=SECS] [user=USER] [verify-remote-host=false]
This is an nbdkit(1) plugin which lets you access remote disk images over Secure Shell (SSH). Any server which hosts disk images and runs an SSH server can be turned into an NBD source using this plugin.
The remote file can be read or written. To force read-only access add the -r flag.
The "config" parameter is optional. If it is not specified at all then ~/.ssh/config and /etc/ssh/ssh_config are both read. Missing or unreadable files are ignored.
If set, the remote file will be created. The remote file is created on the first NBD connection to nbdkit, not when nbdkit starts up. If the file already exists, it will be replaced and any existing content lost.
If using this option, you must use "create-size". "create-mode" can be used to control the permissions of the new file.
If using "create=true" specify the default permissions of the new remote file. You can use octal modes like "create-mode=0777" or "create-mode=0644". The default is 0600, ie. only readable and writable by the remote user.
If using "create=true", specify the virtual size of the new disk. "SIZE" can use modifiers like "100M" etc.
This parameter is required.
You can give this parameter multiple times.
The default is to check ~/.ssh/known_hosts followed by /etc/ssh/ssh_known_hosts.
Note that passing this on the command line is not secure on shared machines.
This parameter is required.
"path=" is a magic config key and may be omitted in most cases. See "Magic parameters" in nbdkit(1).
This parameter is optional. If not given then the default ssh port is used.
This parameter is optional. If not given then the local username is used.
Setting this to "false" is dangerous because it allows a Man-In-The-Middle (MITM) attack to be conducted against you.
The SSH server’s host key is checked at connection time, and must be present and correct in the local "known hosts" file.
If you have never connected to the SSH server before then the connection will usually fail. You can:
This plugin supports only the following authentication methods: "none", "publickey" or "password". In particular note that "keyboard-interactive" is not supported.
There is no means for nbdkit to ask for the public key passphrase when it is running as a server. Therefore "publickey" authentication must be done in conjunction with ssh-agent(1).
In the "config", "identity" and "known-hosts" options, libssh expands some "%"-sequences.
Set the libssh log level to increasing levels of verbosity. Each level includes messages from the previous levels. Currently the levels are:
Use level 2 to diagnose SSH protocol or server problems. Levels 3 and 4 are extremely verbose and probably only useful if you are debugging libssh itself.
If diagnosing SSH problems it is also useful to look at server-side logs, eg. /var/log/secure or "journalctl -u sshd"
Use "nbdkit --dump-config" to find the location of $plugindir.
"nbdkit-ssh-plugin" first appeared in nbdkit 1.12.
nbdkit(1), nbdkit-curl-plugin(1), nbdkit-extentlist-filter(1), nbdkit-retry-filter(1), nbdkit-plugin(3), ssh(1), ssh-agent(1), https://libssh.org.
Richard W.M. Jones
Parts derived from Pino Toscano’s qemu libssh driver.
Copyright (C) 2014-2020 Red Hat Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2023-01-04 | nbdkit-1.32.5 |