Port Forwarding for FTP

 » Table of Contents

 » Glossary

 » Index

When you are connecting to an OpenVMS FTP server, in addition to the -"L" or -"R" options, you must specify the FTP protocol and set the connection to passive mode, as shown in the following examples.

  • From an OpenVMS system to another OpenVMS system

    • Local FTP port forwarding

      On system VMSHOST1, enter the following commands:

      $ SSH -"L" ftp/2001:localhost:21 VMSHOST2

      From another window on VMHOST1, enter the following commands:

      $ FTP localhost 2001
      ftp> set passive on

      Result: A secure FTP connection is established.

    • Remote FTP port forwarding

      On system VMSHOST1, enter the following command:

      $ SSH -"R" ftp/2001:localhost:21 VMSHOST2

      On system VMSHOST2, enter the following command:

      $ FTP localhost 2001
      ftp> set mode passive

      Result: The connection is made to VMSHOST1.

  • SSH for OpenVMS client to a non-SSH for OpenVMS server

    • Local FTP port forwarding

      On system VMSHOST1, enter the following command:

      $ SSH -"L" ftp/2001:localhost:21 NONVMSHOST

      From another windows on VMSHOST1, enter the following command:

      $ FTP localhost 2001
      Result: The connection is made to NONVMSHOST.

    • Remote FTP port forwarding

      On system VMSHOST1, enter the following command:

      $ SSH -"R" ftp/2001:localhost:21 NONVMSHOST

      On system NONVMSHOST, enter the following command:

      # ftplocalhost 2001
      ftp> set mode passive

      Result: The connection is made to the VMSHOST1 system.

  • Non SSH for OpenVMS client toSSH for OpenVMS server

    • Local FTP port forwarding

      On system NONVMSHOST, enter the following commands:

      # ssh -L ftp/2001:localhost:21 VMSHOST1
      # ftp localhost 2001
      ftp> set mode passive

      Result: The connection is made to the VMSHOST1 system.

    • Remote FTP port forwarding

      On system NONVMSHOST, enter the following command:

      # ssh -R ftp/2001:localhost:21 VMSHOST1
      

      On system VMSHOST1, enter the following command:

      $ FTP localhost 2001

      Result: The connection is made to the NONVMSHOST system.