SSH_ASKPASS + oProxyCommand sample?

Discussion about community tools that we make available for z/OS without support
Post Reply
Posts: 3
Joined: Fri Mar 22, 2019 8:26 am

SSH_ASKPASS + oProxyCommand sample?

Post by Carol »

Can anyone share an example of using SSH_ASKPASS + oProxyCommand with either sFTP, Co:Z, COZBATCH that works with going through a SOCKS 5 proxy?
Site Admin
Posts: 2007
Joined: Thu Jul 29, 2004 12:12 pm

Re: SSH_ASKPASS + oProxyCommand sample?

Post by dovetail »

You will need to get a proxy command for z/OS, we have one that works with z/OS OpenSSH here:

Next, the best thing to do is to create a $HOME/.ssh/config file for the userid and add something like this to it:

Code: Select all

Host *
    ProxyCommand ssh-proxyc -v -p %h %p
    ProxyUseFDpass yes
Host *
# continue with options that apply to all hosts....
- substitute the hostname or ip address and port of your socks proxy
- ssh-proxyc will need to be in the $PATH unless you also specify the path
- you can also put these in the sitewide /etc/ssh/config file

Then, log in to this z/OS system with an ssh shell and test it interactively:

ssh -vvv

If this works, then you can use the same SSH_ASKPASS setup that you use for your other batch SFTP jobs.
We suggest using Co:Z in batch with our sample procs and scripts, which is easy to setup and maintain: ... batch_proc
Post Reply