SFTP script using firewall information

Hi,
i have a scripts which transfer a file from source to dest server. It uses the firewall information like IP, USERNAME, PASSWORD.

I wanted to know it belongs to source system firewall or the destination firewall info. How to check that firewall connection is working or no without running the script?

At the command line:

sftp USERNAME@IP
sftp> PASSWORD
sftp> ls
sftp> exit