× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



CCSID of the job/file?

Jim Oberholtzer
Agile Technology Architects



On Jun 18, 2021, at 8:18 AM, Michael Fulmer <mfulmer@xxxxxxx> wrote:

 Open Source Group,

This is my first attempt at sFTP on the IBM i The System is running OS
V7R3M0. I've searched the Midrange Archive and found nothing helpful.

My Client has been ask to send .txt files to their bank via sFTP. I've
setup ssh and sFTP to the best of my knowledge. I created a Public Key and
exchanged with the bank. The bank has verified that the connection is
established. My problem lies in the transfer of the data file.

It's just a simple PUT statement run from a script using QSHONI. Which
I've successfully used in the past to run cURL scripts.

put /home/CATOOSA/filename.txt

quit



The problem may be in the following command, although I find very little
documentations on the purpose of SSH_FXP_REALPATH.

debug3: SSH_FXP_REALPATH . -> /users/catoosa size 0

sftp> ¤£@a
aÃÁãÖÖâÁaÁÃÈmÃäÄÁmòðòñðöñöñðñôðóK£§£@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Invalid command.

The bank says the User's default directory exists and the User Profile has
authority to use it. I'm also told that directory is the User's Default so
I don't have to execute a Change Directory.

Any comments/suggestions would be greatly appreciated.

The Complete Debug Log is shown below. The URL and IP have been changed to
protect the innocent.



OpenSSH_6.9p1, OpenSSL 1.0.2p 14 Aug 2018

debug1: Reading configuration data
/QOpenSys/QIBM/ProdData/SC1/OpenSSH/etc/ssh_config

debug2: ssh_connect: needpriv 0

debug1: Connecting to bankonline.com [1.1.1.1] port 22.

debug1: Connection established.

debug1: key_load_public: No such file or directory

debug1: identity file /home/CATOOSA/.ssh/id_rsa type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/CATOOSA/.ssh/id_rsa-cert type -1

debug1: identity file /home/CATOOSA/.ssh/id_dsa type 2

debug1: key_load_public: No such file or directory

debug1: identity file /home/CATOOSA/.ssh/id_dsa-cert type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/CATOOSA/.ssh/id_ecdsa type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/CATOOSA/.ssh/id_ecdsa-cert type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/CATOOSA/.ssh/id_ed25519 type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/CATOOSA/.ssh/id_ed25519-cert type -1

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_6.9

debug1: Remote protocol version 2.0, remote software version
WS_FTP-SSH_8.6.1.1504

debug1: no match: WS_FTP-SSH_8.6.1.1504

debug2: fd 3 setting O_NONBLOCK

debug1: Authenticating to bankonline.com:22 as 'CATOOSA'

debug3: hostkeys_foreach: reading file "/home/CATOOSA/.ssh/known_hosts"

debug3: record_hostkey: found key type RSA in file
/home/CATOOSA/.ssh/known_hosts:1

debug3: load_hostkeys: loaded 1 keys from bankonline.com

debug3: order_hostkeyalgs: prefer hostkeyalgs:
ssh-rsa-cert-v01@xxxxxxxxxxx,ssh-rsa-cert-v00@xxxxxxxxxxx,ssh-rsa

debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug2: kex_parse_kexinit:
curve25519-sha256@xxxxxxxxxx,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-grou

debug2: kex_parse_kexinit:
ssh-rsa-cert-v01@xxxxxxxxxxx,ssh-rsa-cert-v00@xxxxxxxxxxx,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@xxxxxxxxxx

debug2: kex_parse_kexinit:
chacha20-poly1305@xxxxxxxxxxx,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@xxxxxxxxxxx,aes256-gcm@openssh.

debug2: kex_parse_kexinit:
chacha20-poly1305@xxxxxxxxxxx,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@xxxxxxxxxxx,aes256-gcm@openssh.

debug2: kex_parse_kexinit:
umac-64-etm@xxxxxxxxxxx,umac-128-etm@xxxxxxxxxxx,hmac-sha2-256-etm@xxxxxxxxxxx,hmac-sha2-512-etm@openssh.

debug2: kex_parse_kexinit:
umac-64-etm@xxxxxxxxxxx,umac-128-etm@xxxxxxxxxxx,hmac-sha2-256-etm@xxxxxxxxxxx,hmac-sha2-512-etm@openssh.

debug2: kex_parse_kexinit: none,zlib@xxxxxxxxxxx

debug2: kex_parse_kexinit: none,zlib@xxxxxxxxxxx

debug2: kex_parse_kexinit:

debug2: kex_parse_kexinit:

debug2: kex_parse_kexinit: first_kex_follows 0

debug2: kex_parse_kexinit: reserved 0

debug2: kex_parse_kexinit:
diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group14-sha256

debug2: kex_parse_kexinit: ssh-dss,ssh-rsa

debug2: kex_parse_kexinit:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,3des-cbc,blowfish-cbc,aes128-cbc,cast128-cbc

debug2: kex_parse_kexinit:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,3des-cbc,blowfish-cbc,aes128-cbc,cast128-cbc

debug2: kex_parse_kexinit:
hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-sha2-256,hmac-sha2-384,hmac-sha2-512

debug2: kex_parse_kexinit:
hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-sha2-256,hmac-sha2-384,hmac-sha2-512

debug2: kex_parse_kexinit: none

debug2: kex_parse_kexinit: none

debug2: kex_parse_kexinit:

debug2: kex_parse_kexinit:

debug2: kex_parse_kexinit: first_kex_follows 0

*YES

debug2: kex_parse_kexinit: reserved 0

debug1: kex: server->client aes128-ctr hmac-sha2-256 none

debug1: kex: client->server aes128-ctr hmac-sha2-256 none

debug1: sending SSH2_MSG_KEXDH_INIT

debug2: bits set: 1056/2048

debug1: expecting SSH2_MSG_KEXDH_REPLY

debug1: Server host key: ssh-rsa
SHA256:dQG4VSlacHK/5KP7qJ7AU8VJCRtZptLJlDi8ZQ5mQB8

debug3: hostkeys_foreach: reading file "/home/CATOOSA/.ssh/known_hosts"

debug3: record_hostkey: found key type RSA in file
/home/CATOOSA/.ssh/known_hosts:1

debug3: load_hostkeys: loaded 1 keys from bankonline.com

debug3: hostkeys_foreach: reading file "/home/CATOOSA/.ssh/known_hosts"

debug3: record_hostkey: found key type RSA in file
/home/CATOOSA/.ssh/known_hosts:1

debug3: load_hostkeys: loaded 1 keys from 1.1.1.1

debug1: Host 'bankonline.com' is known and matches the RSA host key.

debug1: Found key in /home/CATOOSA/.ssh/known_hosts:1

debug2: bits set: 1037/2048

debug2: set_newkeys: mode 1

debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug2: set_newkeys: mode 0

debug1: SSH2_MSG_NEWKEYS received

debug1: SSH2_MSG_SERVICE_REQUEST sent

debug2: service_accept: ssh-userauth

debug1: SSH2_MSG_SERVICE_ACCEPT received

debug2: key: /home/CATOOSA/.ssh/id_rsa (0),

debug2: key: /home/CATOOSA/.ssh/id_dsa (20024f90),

debug2: key: /home/CATOOSA/.ssh/id_ecdsa (0),

debug2: key: /home/CATOOSA/.ssh/id_ed25519 (0),

debug1: Authentications that can continue: publickey,password

debug3: start over, passed a different list publickey,password

debug3: preferred publickey

debug3: authmethod_lookup publickey

debug3: remaining preferred:

debug3: authmethod_is_enabled publickey

debug1: Next authentication method: publickey

debug1: Trying private key: /home/CATOOSA/.ssh/id_rsa

debug3: no such identity: /home/CATOOSA/.ssh/id_rsa: No such file or
directory

debug1: Offering DSA public key: /home/CATOOSA/.ssh/id_dsa

debug3: send_pubkey_test

debug2: we sent a publickey packet, wait for reply

debug1: Server accepts key: pkalg ssh-dss blen 434

debug2: input_userauth_pk_ok: fp
SHA256:cB2qEz4fkucWJP5Ivn9Vinaofx0STGdtq38+o2TLAl4

debug3: sign_and_send_pubkey: DSA
SHA256:cB2qEz4fkucWJP5Ivn9Vinaofx0STGdtq38+o2TLAl4

debug1: Authentication succeeded (publickey).

Authenticated to bankonline.com ([1.1.1.1]:22).

debug2: fd 4 setting O_NONBLOCK

debug2: fd 5 setting O_NONBLOCK

debug1: channel 0: new [client-session]

debug3: ssh_session2_open: channel_new: 0

debug2: channel 0: send open

debug1: Entering interactive session.

debug2: callback start

debug2: fd 3 setting TCP_NODELAY

debug3: ssh_packet_set_tos: set IP_TOS 0x08

debug2: client_session2_setup: id 0

*YES

debug1: Sending subsystem: sftp

debug2: channel 0: request subsystem confirm 1

debug2: callback done

debug2: channel 0: open confirm rwindow 300000 rmax 30000

debug2: channel_input_status_confirm: type 99 id 0

debug2: subsystem request accepted on channel 0

debug2: Remote version: 3

debug3: Sent message fd 4 T:16 I:1

debug3: SSH_FXP_REALPATH . -> /users/catoosa size 0

sftp> ¤£@a
aÃÁãÖÖâÁaÁÃÈmÃäÄÁmòðòñðöñöñðñôðóK£§£@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Invalid command.

debug2: channel 0: read<=0 rfd 4 len 0

debug2: channel 0: read failed

debug2: channel 0: close_read

debug2: channel 0: input open -> drain

debug2: channel 0: ibuf empty

debug2: channel 0: send eof

debug2: channel 0: input drain -> closed

debug2: channel 0: rcvd close

debug2: channel 0: output open -> drain

debug3: channel 0: will not send data after close

debug2: channel 0: obuf empty

debug2: channel 0: close_write

debug2: channel 0: output drain -> closed

debug2: channel 0: almost dead

debug2: channel 0: gc: notify user

debug2: channel 0: gc: user detached

debug2: channel 0: send close

debug2: channel 0: is dead

debug2: channel 0: garbage collecting

debug1: channel 0: free: client-session, nchannels 1

debug3: channel 0: status: The following connections are open:

#0 client-session (t4 r303 i3/0 o3/0 fd -1/-1 cc -1)

debug3: fd 0 is not O_NONBLOCK

debug3: fd 1 is not O_NONBLOCK

Transferred: sent 3656, received 2496 bytes, in 0.5 seconds

Bytes per second: sent 7035.5, received 4803.2

debug1: Exit status -1

*YES


--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/opensource.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.