Re: SFTP problem:421 Rejected command, requested IP address does not match control connection IP
Posted: 2018-10-30 04:22
Rule of thumb: If you see PORT or EPRT in the log, it is Active mode. If you see PASV or EPSV, it's Passive. Seeing both means there was a failure and a fallback to the other mode following it.
Getting your IP depends on OS. Without any NAT, easiest way is from a Terminal/cmd shell.
Linux and probably MacOS: ifconfig
Windows: ipconfig
If you are behind a router, you need to look up the IPv4 in the router, or use external services. With many web search facilities, searching for "IP" will tell you the public IPv4 you need.
Note: Active mode requires configuration at the client side: Telling the client your current public IP, forwarding and opening the data ports. Many simple clients cannot do that. Passive mode is always recommended as it doesn't require all that hassle.
Getting your IP depends on OS. Without any NAT, easiest way is from a Terminal/cmd shell.
Linux and probably MacOS: ifconfig
Windows: ipconfig
If you are behind a router, you need to look up the IPv4 in the router, or use external services. With many web search facilities, searching for "IP" will tell you the public IPv4 you need.
Note: Active mode requires configuration at the client side: Telling the client your current public IP, forwarding and opening the data ports. Many simple clients cannot do that. Passive mode is always recommended as it doesn't require all that hassle.