Computer A (assumed that ip is 44.44.44.44)can ftp the host 130.89.148.12.
ftp 130.89.148.12
Connected to 130.89.148.12.
220 ftp.debian.org FTP server
Name (130.89.148.12:debian8): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
Computer B (my local pc) can not ftp the host 130.89.148.12. Let's build a ssh tunnel with ssh command this way:
ssh -L -f -N localhost:2121:130.89.148.12:21 root@44.44.44.44
The ssh tunnel between my local pc and Computer A (44.44.44.44) was connected after password to login into 44.44.44.44.
Then to input the command on my local pc console:
ftp localhost:2121
ftp: localhost:2121: Name or service not known
What is the matter with my ssh tunnel?
Think to chexum, the right ftp command is ftp localhost 2121
But new problem.
ftp(1)
manpage on how to specify a port. It's usually separated by a space (not a colon), or as a-p
option. You'll also need to make sure to use passive ftp, so check the manual first. – chexum Dec 25 '15 at 13:35