Jump to content

SSH on Apache [SOLVED]


Murda
 Share

Recommended Posts

Hi.

 

I got this idea at work and I would like to have a SSH connection to home server. Bad thing that our firewall here blocks all connections through port 22 (SSH port).

 

Is it possible to have a SSH client running on Apache? I think it is, but after a 30min googleing round, I couldn't find any name for a such program. I have Apache running on my home server, so i would like to install it there and browse to my home server from work with IE and login via SSH.

 

Is there any other solution for this?

 

And then SSL, do i need it? I know that i need htaccess (so people can't start hammering my server with usernames and passwords).

 

This isn't an urgent one, but any help would be appreciated. I just want to learn more about Linux systems.

Edited by Murda
Link to comment
Share on other sites

You could install webmin, and use this remotely to manage your server instead of using ssh.

 

I don't know of anything else you could use via http or https.

Link to comment
Share on other sites

You could install webmin, and use this remotely to manage your server instead of using ssh.

 

I don't know of anything else you could use via http or https.

 

I already have a Webmin server installed, but my hardware firewall blocks connections to Webmin port (10000) for security reasons. I just don't like the idea that someone can hack my webmin and do just about everything. Maybe this is the only option now.

 

My SSH server is also protected with DenyHosts. It may have some effect if someone tries to access (brute-force attack) via Apache SSH client. DenyHosts would ban the local IP address of the server. But that's why I'm putting .htaccess there. If anyone just had the idea how to do that Apache SSH.

 

You can change the port ssh listens on to something else, perhaps that would be a good way round it?

 

Is it possible to make SSH server to listen 2 ports, like 22 and 5555.

 

I would like to let that default port be the way it is, because there are other users that need access to that SSH server too.

Edited by Murda
Link to comment
Share on other sites

Is it possible to make SSH server to listen 2 ports, like 22 and 5555.

 

It is. IIRC you can just add another port to the sshd_config:

 

ListenAddress 10.0.1.1:22

ListenAddress 10.0.1.1:5555

 

obviously you'll need to replace 10.0.1.1 with your IP address. I haven't tested this, but I know it's something like that you should do.

Link to comment
Share on other sites

It is. IIRC you can just add another port to the sshd_config:

 

ListenAddress 10.0.1.1:22

ListenAddress 10.0.1.1:5555

 

obviously you'll need to replace 10.0.1.1 with your IP address. I haven't tested this, but I know it's something like that you should do.

 

Nice. I'll test this out today and post here how it works. Thanks.

Link to comment
Share on other sites

Guest chesneysteve

Setup the openssh server on your home system to listen on a port which is not blocked by the works firewall. You can then use an ssh client at work to connect to this port instead of port 22. I you want to connect to your home apache server you can tunnel it's listening port through openssh to your works machine using an abitary port number at work. To do this use an ssh client to forward a local port to your home server. Then using IE or whatever connect to http://your_ip:localy_forwarded_port. I haven't given you chapter and verse here because I don't have time but what you want to do is perfectly feasable and one of the great strengths of SSH. There is a very goof O-Reilly book on OpenSSH.

Link to comment
Share on other sites

  • 3 weeks later...
Nice. I'll test this out today and post here how it works. Thanks.

 

I ran into problems configuring my hardware firewall, so I can't forward ports to my server anymore.

I think that my firewall "forgot" it's admin password (maybe due to overheating) and I can't log in to it's web console. :P

 

I'll reset it to factory defaults when I have time. :thumbs:

So I can't use double SSH ports now. That's why I needed a SSH client which works on apache. But maybe it's impossible then.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...