SSH_ASKPASS + oProxyCommand sample?
SSH_ASKPASS + oProxyCommand sample?
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?
Re: SSH_ASKPASS + oProxyCommand sample?
You will need to get a proxy command for z/OS, we have one that works with z/OS OpenSSH here:
https://dovetail.com/community/sshproxyc.html
Next, the best thing to do is to create a $HOME/.ssh/config file for the userid and add something like this to it:
- 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 myuser@aaa.something.com
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:
https://dovetail.com/docs/sftp/client.h ... batch_proc
https://dovetail.com/community/sshproxyc.html
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 *.something.com
ProxyCommand ssh-proxyc -v -p socks.proxy.myco.com:9989 %h %p
ProxyUseFDpass yes
Host *
# continue with options that apply to all hosts....
- 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 myuser@aaa.something.com
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:
https://dovetail.com/docs/sftp/client.h ... batch_proc