Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] get free local port for script?
- Date: Sat, 17 Mar 2007 21:08:51 +0900
- From: Edward Wright <edw@example.com>
- Subject: [tlug] get free local port for script?
- User-agent: Mutt/1.4i
Hi, 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 can think of kludgy things like grepping thru the output of netstat to see if some port is in use, but it seems like there should be a cleaner way. Ideally, something like ssh -L `getfreeport`:remotehost:remoteport...... where "getfreeport" would be my ideal function. My reference books and google don't yield anything interesting. Ideas? Thanks, Ed
- Follow-Ups:
- [tlug] get free local port for script?
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Adding text to the beginning of a file
- Next by Date: Re: [tlug] Adding text to the beginning of a file
- Previous by thread: Re: [tlug] Adding text to the beginning of a file
- Next by thread: [tlug] get free local port for script?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links