LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-01-2009, 03:25 AM   #1
littlebigman
Member
 
Registered: Aug 2008
Location: France
Posts: 658

Rep: Reputation: 35
Question Simpler knockd to open SSH on remote server?


Hello

I'm looking for a way to open up the SSH port on a remote server behind a NAT firewall so I can connect from the Net (from a Windows host) while reducing the risk of running SSHd at all times.

I've never used it, but it seems like Knockd is close to what I'm looking for (trying to connect to several specific ports within a certain timeframe will launch SSHd), but that would require opening up several ports on the router just for Knockd. I find the alternative of using one-time sequences too complicated.

Does someone know of a simpler system, where the daemon would be listening to a _single port_ and launch SSHd if it got -_specific data patterns_ in TCP packets?

Thank you.
 
Old 04-01-2009, 06:13 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Not sure, but wouldn't a "specific pattern" basically be a password? if so, I'd rather pass that password over a secure ssh connection than a raw tcp socket. You could easily write a simple xinetd daemon to listen on a port and use netcat to pipe whatever recieved data you get into a simple script, but the point of port knocking is that no data is ever allowed IN to the system, which wouldn't be that case in your model.

If you do want to persist with this, you can do most of it within iptables, no need for a daemon in itself.

http://www.debian-administration.org/articles/268

Based on this you could introduce a "-m match" check to watch the contents of a stream. As to how to get that stream set up in the first place though, again i'd suggest netcat just sending everything to /dev/null

Last edited by acid_kewpie; 04-01-2009 at 06:38 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redhat9 ssh Remote X Display Can't Open under windows xp dreamcarrior Linux - Networking 1 10-05-2008 12:21 AM
SSH timeout on remote server investmentbnker75 Linux - Networking 3 04-11-2008 03:00 PM
SSH Error to remote Server shawnbishop Linux - Software 1 06-04-2007 01:50 AM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM
copy files using SSH from a server to another..both remote Santosh_d Linux - Networking 6 03-10-2004 11:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration