SFTP Port number

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
neckhardt
Posts: 1
Joined: Mon Jun 11, 2012 10:59 am

SFTP Port number

Post by neckhardt »

I am trying to initiate an SFTP session using COZBATCH. I have tried, unsuccessfully, to specify a port number for the SFTP transfer. I am sure it is easy, but the proper statement, or place to use the statement escapes me.

Any help would be appreciated.

Thanks,
Neal
coz
Posts: 392
Joined: Fri Jul 30, 2004 5:29 pm

Re: SFTP Port number

Post by coz »

You can specify the port via the -o option:

Code: Select all

sftp -oPort=2222 user@host
If you are using our sample scripts, add this to the ssh-opts environment variable:

Code: Select all

ssh_opts="$ssh_opts -oPort=2222"
Post Reply