sftp vs cozsftp options differ

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
cjpete8
Posts: 13
Joined: Thu Aug 08, 2013 10:11 am

sftp vs cozsftp options differ

Post by cjpete8 »

In my /etc/ssh/sftp-server.rc I have coded USE_COZ_SFTP=true. When I issue an sftp command from an SSH session the options are set as follows:

sftp> ls /+
/+/clientcp=ISO8859-1 /+/conddisp=catlg /+/error.log /+/estsize /+/jeslrecl=80 /+/jesowner=CJPETE8 /+/jesrecfm=f /+/jesstatus=* /+/loglevel=I /+/mode=binary /+/replace /+/servercp=IBM-1047 /+/showall /+/smf /+/trim


If I issue a cozsftp command from an SSH session one of the options is different: clientcp

cozsftp> ls /+
/+/clientcp=IBM-1047 /+/conddisp=catlg /+/error.log /+/estsize /+/jeslrecl=80 /+/jesowner=CJPETE8 /+/jesrecfm=f /+/jesstatus=* /+/loglevel=I /+/mode=binary /+/replace /+/servercp=IBM-1047 /+/showall /+/smf /+/trim


Why is there a difference if sftp is suppose to be executing cozsftp becuase I have USE_COZ_SFTP=true coded.
dovetail
Site Admin
Posts: 2025
Joined: Thu Jul 29, 2004 12:12 pm

Re: sftp vs cozsftp options differ

Post by dovetail »

In the first example, you are using a generic SFTP client connecting to Co:Z SFTP server. The clientcp defaults to ISO8859-1 unless otherwise set when using mode=text

In the second example, you are using the Co:Z SFTP client connecting to the Co:Z SFTP server. In this case the Co:Z SFTP server detects that that client is also running Co:Z SFTP and then they exchange their local codepages, which are both IBM-1047. If you did a lzopts (list local options) command in the Co:Z SFTP client, you see that the clientcp and servercp are also both set to IBM-1047.

If you had a third case where the Co:Z SFTP client connected to a generic SFTP server, the servercp would default to ISO8859-1 unless otherwise set when using mode=text.

This is the way it is supposed to work, and hopefully makes sense.
Post Reply