ssh via webmin.

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

ssh via webmin.

Post by jameswilson »

I have a system with a couple of ports open on the web but not 22. I would like to use ssh to 'talk' to the box but whenever i open 22 i keep getting dictionary attacks on the machine.

I have noticed there are a couple of webmin modules for ssh access and wondered if anyone knew how to configure these to use the webmin port alone?

Cheers

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Hi James,
Your best bet is to change the ssh port to a nonstandard port in ssh.conf then in webmin you can check the "module config" tab and set the port to the same port you configured in ssh.conf. Of coarse you can do all this trough webmin as well by going to "servers" -> "ssh server" -> "networking" and setting the port for the server then set the module the same settings in "others" -> "ssh/telnet" -> "module config" -> "Port to connect to:"

cheers,
Corey
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I second that. Never leave ssh on port 22 it's just too much hassle. Checks zm.com for ssh on 22
Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i see never leave anything on default port numbers.

The problem is i.t. have opened 80, 443 and 10000 for me but wont open any more, so i was hoping that webmin could connect to ssh via the 10000 as i cannot open any more ports
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

You can tunnel ssh over http I think but I wouldn't recommend it. Is there a reason why you can't get port 6376 for instance opened? Can you not tell IT who's the boss?
Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

its not my i.t department so i doubt that would go down to well lol.

Most of the time i dont need it as i can do everything from webmin normally but i really mis top and seeing what the processors are upto live.

If its too hard i will give up i think. I use putty on the lan a treat
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I know it's not quite the same but you can use top -n 1 -b via the execute command function of webmin. I'm surprised that you managed to get port 10000 opened up but not one for ssh. The other alternative is configuring ssh to also run on port 10000 and remembering to switch sshd and webmin on and off appropriately. It's a bit risky though in case you forget and log yourself out.
Phil
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Hi all,

To deal with this type of attack I use DenyHosts

http://denyhosts.sourceforge.net/

It's very configurable. I set mine up to cut off an IP address after 3 failed ssh attempts, or one failed attempt as root. Thereafter all packets from the offending address to any port (configurable) are dropped.

If this will solve the problem for you it can be less complicated than the convoluted ssh, sftp, scp commands using a nonstandard port.

Best regards,

Ross
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

looks ideal Ross
Thanks
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Post Reply