Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FTP - `Name or service not know`

I have an app, on my iphone, which allows me to transfer songs too and from my linux desktop via ftp. The app indicates that the host address is 192.168.0.4 and the port to be used is 5021. I can connect fine to the device from filezilla but when I try to connect via the command line it fails with the error mentioned in the title.

The command i'm using is ftp 192.168.0.4:5021 but it fails. I'm totally stumped. When I search for help on the internet the answer is to simply do what I've done already.

Does anyone have an any idea on what to do?

like image 555
rflood89 Avatar asked May 02 '12 21:05

rflood89


1 Answers

The ftp command does not support the :5021 syntax for port numbers. Instead, there must be another way.

With some FTP clients, you can use a -P command line option:

ftp -P 5021 192.168.0.4

With others, you need to put the port number after the host address with a space:

ftp 192.168.0.4 5021

Use man ftp to see which yours supports.

like image 163
Greg Hewgill Avatar answered Sep 19 '22 13:09

Greg Hewgill