Sftp connect with ssh key

Hi guys,

I’d like to connect to the server via sftp. Here’s the output of the connection trial; can you tell me what’s wrong and what has to be done in order to make it work? I have wappler version 2.0.1.0


  • set color:use-color yes
  • set cmd:interactive yes
  • set file:charset utf-8
  • set xfer:clobber on
  • set ftp:timezone
  • set cmd:show-status yes
  • set cmd:set-term-status yes
  • set ftp:list-options -a
  • set cmd:fail-exit yes
  • set cmd:time-style “%Y-%m-%d %H:%M:%S”
  • set ftp:ssl-allow no
  • set ssl:verify-certificate no
  • set sftp:auto-confirm yes
  • set sftp:connect-program “ssh -a -x -v -i C:\Users\mysite.com\.ssh\id_ed25519”
  • set net:max-retries 3
  • set net:timeout 20
  • set net:reconnect-interval-base 5
  • set net:reconnect-interval-multiplier 1
  • open -u user sftp://mysite.com
    Password:
  • ls
    ---- Running connect program (ssh -a -x -v -i C:\Users*mysite.com*.ssh\id_ed25519 -s -l user mysite.com
    sftp)
    —> sending a packet, length=5, type=1(INIT), id=0
    <— Warning: Identity file mysite.com not accessible: No such file or directory.
    <— OpenSSH_7.6p1, OpenSSL 1.0.2m 2 Nov 2017
    <— debug1: Connecting to mysite.com [xxx.xxx.xxx.xxx] port 22.
    <— debug1: Connection established.
    <— debug1: key_load_public: No such file or directory
    <— debug1: identity file /cygdrive/c/Users/mysite.com type -1
    <— debug1: key_load_public: No such file or directory
    <— debug1: identity file /cygdrive/c/Users/mysite.com type -1
    <— debug1: key_load_public: No such file or directory
    <— debug1: identity file /cygdrive/c/Users/mysite.com type -1
    <— debug1: key_load_public: No such file or directory
    <— debug1: identity file /cygdrive/c/Users/mysite.com type -1
    <— debug1: key_load_public: No such file or directory
    <— debug1: identity file /cygdrive/c/Users/mysite.com type -1
    <— debug1: key_load_public: No such file or directory
    <— debug1: identity file /cygdrive/c/Users/mysite.com type -1
    <— debug1: identity file /cygdrive/c/Users/mysite.com type 3
    <— debug1: key_load_public: No such file or directory
    <— debug1: identity file /cygdrive/c/Users/mysite.com type -1
    <— debug1: Local version string SSH-2.0-OpenSSH_7.6
    <— debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
    <— debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
    <— debug1: Authenticating to mysite.com as ‘user
    <— debug1: SSH2_MSG_KEXINIT sent
    <— debug1: SSH2_MSG_KEXINIT received
    <— debug1: kex: algorithm: curve25519-sha256
    <— debug1: kex: host key algorithm: ecdsa-sha2-nistp256
    <— debug1: kex: server->client cipher: mysite.com MAC: compression: none
    <— debug1: kex: client->server cipher: mysite.com MAC: compression: none
    <— debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    <— debug1: Server host key: ecdsa-sha2-nistp256 SHA256:SVHs6kOXtQRTcQRfnQ2I84+NmJCXr8ZB9DS2JhfqdLo
    <— debug1: Host ‘mysite.com’ is known and matches the ECDSA host key.
    <— debug1: Found key in /cygdrive/c/Users/mysite.com
    <— debug1: rekey after 134217728 blocks
    <— debug1: SSH2_MSG_NEWKEYS sent
    <— debug1: expecting SSH2_MSG_NEWKEYS
    <— debug1: SSH2_MSG_NEWKEYS received
    <— debug1: rekey after 134217728 blocks
    <— debug1: SSH2_MSG_EXT_INFO received
    <— debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
    <— debug1: SSH2_MSG_SERVICE_ACCEPT received
    <— debug1: Authentications that can continue: publickey
    <— debug1: Next authentication method: publickey
    <— debug1: Trying private key: /cygdrive/c/Users/mysite.com
    <— debug1: Trying private key: /cygdrive/c/Users/mysite.com
    <— debug1: Trying private key: /cygdrive/c/Users/mysite.com
    <— debug1: Offering public key: ED25519 SHA256:8OKcY96wv10SJt7IxnAMyu+fWVGKh4RBb93MQwd8KcY /cygdrive/c/Users/mysite.com
    <— debug1: Server accepts key: pkalg ssh-ed25519 blen 51
    <— debug1: Authentication succeeded (publickey).
    <— Authenticated to mysite.com ([xxx.xxx.xxx.xxx]:22).
    <— debug1: channel 0: new [client-session]
    <— debug1: Requesting mysite.com
    <— debug1: Entering interactive session.
    <— debug1: pledge: network
    <— debug1: client_input_global_request: rtype mysite.com want_reply 0
    <— debug1: Sending subsystem: sftp
    <— got a packet, length=150, type=2(VERSION), id=0
    ---- protocol version set to 3
    —> sending a packet, length=10, type=16(REALPATH), id=1
    <— got a packet, length=23, type=104(NAME), id=1
    ---- home set to /
    ---- path on wire is `/’
    —> sending a packet, length=10, type=11(OPENDIR), id=2
    <— got a packet, length=13, type=102(HANDLE), id=2
    ---- got file handle 00000000 (4)
    —> sending a packet, length=13, type=12(READDIR), id=3
    <— got a packet, length=373, type=104(NAME), id=3
    ---- file name count=3
    —> sending a packet, length=13, type=12(READDIR), id=4
    —> sending a packet, length=13, type=12(READDIR), id=5
    <— got a packet, length=28, type=101(STATUS), id=4
    ---- status code=1(EOF), message=End of file
    ---- eof
    <— got a packet, length=28, type=101(STATUS), id=5
    ---- status code=1(EOF), message=End of file
    drwxr-xr-x 3 0 0 49 Feb 3 06:36 .
    drwxr-xr-x 3 0 0 49 Feb 3 06:36 …
    drwxrws— 3 0 0 34 Feb 6 08:02 mysite.com
  • put mysite.com
    —> sending a packet, length=13, type=4(CLOSE), id=6
    ---- path on wire is `/mysite.com
    —> sending a packet, length=42, type=3(OPEN), id=7
    <— got a packet, length=24, type=101(STATUS), id=6
    ---- status code=0(OK), message=Success
    <— got a packet, length=34, type=101(STATUS), id=7
    ---- status code=3(Permission denied), message=Permission denied
    put: Access failed: Permission denied (mysite.com)
    ---- Disconnecting

Thanks in advance for your answer!

Lara

Please update your wappler version then check your ftp account permission and ftp directory