Liking cljdoc? Tell your friends :D

tools.io.sftp


extract-uriclj

(extract-uri target)

Convert url to spec checked map

Convert url to spec checked map
sourceraw docstring

is-password-pubkey?clj

(is-password-pubkey? pwd)

Since dispatch is made only in the url we need to store that information inside.

Assuming password don't contains special characters, we'll use an specific char to flag pubkey usage.

Note: THIS IS A VERY BAD IMPLEMENTATION, but probably the only hacky way to do this (since I need to have this feature realy quickly I don't spent to much time to find a clever approach tbh).

Note 2: Recent versions of OpenSSH (7.8 and newer) generate keys in new OpenSSH format by default, which starts with:

-----BEGIN OPENSSH PRIVATE KEY-----

JSch does not support this key format. You can use ssh-keygen to convert the key to the classic OpenSSH format:

$ ssh-keygen -p -f file -m pem -P passphrase -N passphrase

If you are creating a new key with ssh-keygen, just add -m PEM to generate the new key in the classic format:

$ ssh-keygen -m PEM

Using bullet char as flag:

  • UTF-8: 0xE2 0x80 0xA2
  • UTF-16: 0x2022
Since dispatch is made only in
 the url we need to store that information inside.

Assuming password don't contains special
characters, we'll use an specific char to flag
pubkey usage.

Note: THIS IS A VERY BAD IMPLEMENTATION, but probably
  the only hacky way to do this (since I need to have
  this feature realy quickly I don't spent to much time
  to find a clever approach tbh).

Note 2: Recent versions of OpenSSH (7.8 and newer) generate
   keys in new OpenSSH format by default, which starts with:

   `-----BEGIN OPENSSH PRIVATE KEY-----`

   JSch does not support this key format.
   You can use ssh-keygen to convert the key to the classic OpenSSH format:

   $ ssh-keygen -p -f file -m pem -P passphrase -N passphrase

   If you are creating a new key with ssh-keygen, just add -m PEM to
   generate the new key in the classic format:

   $ ssh-keygen -m PEM

Using bullet char as flag:
  - `UTF-8`: 0xE2 0x80 0xA2
  - `UTF-16`: 0x2022
sourceraw docstring

is-password?clj

source

with-ssh-connectioncljmacro

(with-ssh-connection [bname spec] & body)

Wrap ssh connection context inside the body then gently close connection after evaluation

Wrap ssh connection context inside the body
then gently close connection after evaluation
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close