Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
connecting to ssh on port 80?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
incubator
Guru
Guru


Joined: 05 Jun 2003
Posts: 584
Location: Belgium

PostPosted: Wed Jul 07, 2004 8:09 pm    Post subject: connecting to ssh on port 80? Reply with quote

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
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Wed Jul 07, 2004 8:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
incubator
Guru
Guru


Joined: 05 Jun 2003
Posts: 584
Location: Belgium

PostPosted: Wed Jul 07, 2004 8:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Wed Jul 07, 2004 8:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Jul 07, 2004 8:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
incubator
Guru
Guru


Joined: 05 Jun 2003
Posts: 584
Location: Belgium

PostPosted: Wed Jul 07, 2004 8:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Wed Jul 07, 2004 8:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
incubator
Guru
Guru


Joined: 05 Jun 2003
Posts: 584
Location: Belgium

PostPosted: Wed Jul 07, 2004 9:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
incubator
Guru
Guru


Joined: 05 Jun 2003
Posts: 584
Location: Belgium

PostPosted: Thu Jul 08, 2004 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum