Wednesday, July 5, 2023

Example of setting up sftp (ssh) session behind the proxy to the server on the internet on Linux

% sftp -o "ProxyCommand nc -X connect -x proxy_server_address:proxy_server_port %h %p" -P sftp_server_port username@sftp_server_address

% ssh -o "ProxyCommand nc -X connect -x proxy_server_address:proxy_server_port %h %p" -p ssh_server_port username@ssh_server_address