Skip to main content
edited tags; edited title
Link
Gilles 'SO- stop being evil'
  • 865.5k
  • 205
  • 1.8k
  • 2.3k

What is the matter with Why doesn't FTP work through my ssh tunnel?

added 105 characters in body
Source Link
showkey
  • 581
  • 27
  • 78
  • 148

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   [email protected]

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 chenxumchexum, the right ftp command is ftp localhost 2121 But new problem. enter image description here

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   [email protected]

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 chenxum, the right ftp command is ftp localhost 2121

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   [email protected]

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. enter image description here

added 66 characters in body
Source Link
showkey
  • 581
  • 27
  • 78
  • 148

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   [email protected]

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 chenxum, the right ftp command is ftp localhost 2121

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   [email protected]

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?

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   [email protected]

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 chenxum, the right ftp command is ftp localhost 2121

Source Link
showkey
  • 581
  • 27
  • 78
  • 148
Loading