Computing.Net > Forums > Unix > Port Numbers In etc/hosts

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Port Numbers In etc/hosts

Reply to Message Icon

Name: Alan Vowles
Date: February 20, 2002 at 03:37:16 Pacific
Comment:

I FTP connect to a remote system via an alias specified in my etc/hosts file.

By default the FTP connects via port 21 but I now require to connect to that system using port 8000.

Is there anyway of specifying the port number to be used for that alias in the etc/hosts file?



Sponsored Link
Ads by Google

Response Number 1
Name: Leigh
Date: February 20, 2002 at 15:29:30 Pacific
Reply:

Why don't you just put the post number after the server alias in the ftp string.

eg. ftp alias port


0

Response Number 2
Name: stefancaunter
Date: February 26, 2002 at 20:55:03 Pacific
Reply:

/etc/hosts does not know about ports; it only maps ips to hostnames.
if you are running tcpwrappers you can twist requests for ftp on the server side to be answered on port 8000.
if your system allows it you can use a .netrc file to specify an ftp port or whatever you want when you connect -- see man ftp for syntax.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Port Numbers In etc/hosts

Parse file and save in etc/hosts www.computing.net/answers/unix/parse-file-and-save-in-etchosts/5482.html

The remsh command www.computing.net/answers/unix/the-remsh-command/6640.html

finding application port numbers on sun www.computing.net/answers/unix/finding-application-port-numbers-on-sun/2729.html