View previous topic :: View next topic |
Author |
Message |
incubator Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Jun 2003 Posts: 584 Location: Belgium
|
Posted: Wed Jul 07, 2004 8:09 pm Post subject: connecting to ssh on port 80? |
|
|
Is there a way to configure an ssh server so that people can connect to it on port 80?
Currently I can connect to my ssh server with port 22 from a windows client but on the target systems port 22 is blocked and only 80 is open |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Lajasha Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/11620018224767f02dae8ff.jpg)
Joined: 17 Mar 2004 Posts: 1040 Location: Vibe Central
|
Posted: Wed Jul 07, 2004 8:22 pm Post subject: |
|
|
check out the ssh config file /etc/ssh/sshd_config there should be a line for the port to listen on. If you want it to beable to do both then you can always use iptables to redirect port 80 to 22. Which is what I do from work =P port 23 -> 22 _________________ Come and play in my land |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
incubator Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Jun 2003 Posts: 584 Location: Belgium
|
Posted: Wed Jul 07, 2004 8:36 pm Post subject: |
|
|
I found a bunch of commented lines there, uncommented them, replaced port 22 by port 80, restarted sshd, but I still cant connect on port 80 (using either putty in windows or kssh locally on gentoo) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Lajasha Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/11620018224767f02dae8ff.jpg)
Joined: 17 Mar 2004 Posts: 1040 Location: Vibe Central
|
Posted: Wed Jul 07, 2004 8:43 pm Post subject: |
|
|
I know this is a dumb question but did you edit /etc/ssh/sshd_config or /etc/ssh/ssh_config? _________________ Come and play in my land |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kashani Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/9629732313ee51df8c5935.jpg)
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Jul 07, 2004 8:43 pm Post subject: |
|
|
To verify try to follwoing.
1. on the host running ssh, netstat -ptln
This will show you which port ssh is bound to.
2. on the host running ssh, ssh -p 80 localhost
this will verify that you can connect to the server on port 80.
It's possible that there is a proxy which only allows http commands to port 80 and is blocking ssh.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
incubator Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Jun 2003 Posts: 584 Location: Belgium
|
Posted: Wed Jul 07, 2004 8:48 pm Post subject: |
|
|
I edited ssh_config
ssh -p 80 localhost says connection refused
netstat -ptln returns
Code: |
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN -
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Lajasha Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/11620018224767f02dae8ff.jpg)
Joined: 17 Mar 2004 Posts: 1040 Location: Vibe Central
|
Posted: Wed Jul 07, 2004 8:52 pm Post subject: |
|
|
incubator wrote: | I edited ssh_config | That explains it as you need to edit /etc/ssh/sshd_config. Mind the "d". _________________ Come and play in my land |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
incubator Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Jun 2003 Posts: 584 Location: Belgium
|
Posted: Wed Jul 07, 2004 9:04 pm Post subject: |
|
|
ok, that works now
though I can only connect to it with my main user (the one that I daily use to run in linux)
But I want to allow another user to connect as well.
I created this user with useradd and gave him a home dir but whenever I try to connect with this user, the terminal exits right after he entered his password.
edit: got it working now
a little profile editing and correct paths did the trick now. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
incubator Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 05 Jun 2003 Posts: 584 Location: Belgium
|
Posted: Thu Jul 08, 2004 4:45 pm Post subject: |
|
|
there is just one more problem:
he cant get a connection with X for applications.
I know I typed xhost + both as my user and his to allow anyone to run a graphical application but for some reason when he typed kate, kate appeared on my screen and not his :s
in his .profile I entered source /etc/profile wich has
export DISPLAY=:0.0 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|