teleport-a-binary-file-with-base64

teleport-a-binary-file-with-base64

teleport a binary file between ssh terminals with base64 ########################################################

create a base64 representation of the binary file:

.. code-block:: bash

openssl enc -e -base64 -in /path/to/binary.pfx

create a binary file from its base64 representation:

.. code-block:: bash

cat | openssl enc -d -base64 -out /path/to/binary.pfx

The first command will put the ASCII representation of the file to stdout. The second command will accept the ASCII representation of the binary file and write it to the -out path. Once you paste in the ASCII to the second command, press ctrl-d once or twice to write the binary data out.

You might want to verify some hashes of the file on both sides:

.. code-block:: bash

md5sum /path/to/binary.pfx