Package: docker-machine-add-ssh
DOCKER-MACHINE ADD SSHThis is a command line program to allow you to use ordinarysshcommands withDocker
Machinerather than usedocker-machine sshordocker-machine scp.USAGEusage: docker-machine-add-ssh [-h] [-r] [-d] [-f] [-B] [-S] name

Adds docker-machine ssh configuration to your personal ssh configuration.
Normally, you ssh to a docker-machine using command "docker-machine ssh
<mach>" but after running this utility once for the specified machine, you can
then on use ssh in the normal way, e.g. "ssh <mach>". Other standard programs
such as scp, sftp, rsync, and anything else that relies on them or normal ssh
can then also be used to that docker-machine.

positional arguments:
  name            docker machine name

optional arguments:
  -h, --help      show this help message and exit
  -r, --replace   do not fail if host entry already exists, just replace it
  -d, --delete    just delete any existing host entry
  -f, --files     get parameters directly from files rather than via docker-
                  machine command
  -B, --nobackup  do not create a backup file
  -S, --nostrict  disable strict host key check

Note you can set default starting arguments in ~/.config/docker-machine-add-
ssh-flags.conf.See the latest documentation and code athttps://github.com/bulletmark/docker-machine-add-ssh/.EXAMPLES$treefoodir
foodir
├──a
└──b# Create a docker machine:$docker-machinecreatevb1
...# Login to that machine:$docker-machinesshvb1
...exit# Copy a directory and it's files to the new machine the docker-machine way:$docker-machinescp-rfoodirvb1:
b100$00.0KB/s00:00
a100%00.0KB/s00:00# Or, use docker-machine rsync mode:$docker-machinescp-r-dfoodirvb1:
sendingincrementalfilelist
foodir/a0100%0.00kB/s0:00:00(xfr#1,to-chk=1/3)foodir/b0100%0.00kB/s0:00:00(xfr#2,to-chk=0/3)# Instead, do all this normally, after executing docker-machine-add-ssh:$docker-machine-add-sshvb1
vb1entryaddedto/home/mark/.ssh/config.# Login to that machine normally. Be sure to do this first time to clear# the host check as seen in this example:$sshvb1
Theauthenticityofhost'192.168.99.100 (192.168.99.100)'can't be established.ECDSA key fingerprint is SHA256:Gya8jUcRhXlO/IkkTicrbLEPmMV0V5uOALB2Y5kJUCc.Are you sure you want to continue connecting (yes/no/[fingerprint])? yesWarning: Permanently added '192.168.99.107'(ECDSA)tothelistofknownhosts.

docker@vb1:~$exit# Now you can just use normal scp or rsync:$scp-prfoodirvb1:
b100%00.0KB/s00:00a100%00.0KB/s00:00$rsync-avfoodirvb1:
sendingincrementalfilelist

sent100bytesreceived17bytes234.00bytes/sec
totalsizeis0speedupis0.00# Finished with the machine so delete all trace of it:$docker-machinermvb1
Abouttoremovevb1
WARNING:Thisactionwilldeletebothlocalreferenceandremoteinstance.
Areyousure?(y/n):y
Successfullyremovedvb1

$docker-machine-add-ssh-dvb1
vb1entrydeletedfrom/home/mark/.ssh/config.DEFAULT ARGUMENTSYou can add default arguments to a personal configuration file~/.config/docker-machine-add-ssh-flags.conf. If that file exists then
each line of arguments will be concatenated and automatically prepended
to yourdocker-machine-add-sshcommand line arguments. Comments in the
file (i.e. starting with "#") are ignored.This allow you to set default preferred starting arguments todocker-machine-add-ssh. Typedocker-machine-add-ssh -hto see the
arguments supported.
E.g.echo "-r" >~/.config/docker-machine-add-ssh-flags.confto makedocker-machine-add-sshalways replace existing host entries even if
they already exist.INSTALLATIONEnsuredocker-machineis installed.Arch users can installdocker-machine-add-ssh from the
AUR.Python 3.7 or later is required. Notedocker-machine-add-ssh is on
PyPIso just ensure
thatpython3-pipandpython3-wheelare installed then type the
following to install (or upgrade):$sudopip3install-Udocker-machine-add-sshAlternately, do the following to install from the source repository.$gitclonehttp://github.com/bulletmark/docker-machine-add-ssh
$cddocker-machine-add-ssh# Install globally ..$sudopip3install-U.# Or, install for yourself only ..$pip3install-U.UPGRADE$cddocker-machine-add-ssh# Source dir, as above$gitpull

$sudopip3install-U.# Or, pip3 install -U .REMOVAL$sudopip3uninstalldocker-machine-add-ssh# Or, pip3 uninstall docker-machine-add-sshLICENSECopyright (C) 2020 Mark Blakeney. This program is distributed under the
terms of the GNU General Public License.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or any later
version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License athttp://www.gnu.org/licenses/for more details.