Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] get free local port for script?



Edward Wright writes:

 > I'd like to programmatically access a remote service over an ssh tunnel.
 > I need a free local port to use, and I'm wondering the best way to get
 > one.

I don't understand.  Some will be listening on port P only if you put
it there.  What's wrong with: Pick a port, grep for it in
/etc/services, and if you discover that it's either not there or is
registered only to services you'll never use, use it?



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links