Is it possible to use the standard http/ssh ports on stash?

David Kunkel February 24, 2013

I would like to use the standard http / ssh ports on Stash, but from what I've been able to read in the docs, a port above 1024 is required for ssh. It looks like I could use port 80/443 for http/https, but I don't see an option for using port 22 for ssh.

5 answers

1 accepted

0 votes
Answer accepted
jhinch _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 24, 2013

In order for Stash to run bind to port 80/443 for HTTP and 22 for SSH, it would have to run as the root user. This is highly discouraged and in the case of SSH hosting not supported at all for this very reason.

You can still access Stash on these ports by using port forwarding.

For SSH you can find details at https://confluence.atlassian.com/display/STASH/Setting+up+SSH+port+forwarding

For HTTP we have details on how to set up a Apache proxy at https://confluence.atlassian.com/display/STASH/Integrating+Stash+with+Apache+HTTP+Server

0 votes
mathiaslarsson73 April 15, 2013

A question regarding the port forwarding solution...

The machine that runs my Stash installation also runs other services e.g. Jira and some others.

I administer the machine by ssh-ing to it with Putty through port 22.

If I implement the forwarding of port 22 to 7999, won't I lose the possibility to access the machine via Putty??

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2013

Hi mathlaslarsson73,

Yes that's right. If you intend to do that could simply rebind port 22 for the real SSH to another port. Ideally Stash could hook into a specific user (ie git) via OpenSSL, but that isn't on our radar at the moment.

Charles

0 votes
David Kunkel February 25, 2013

It looks like I'll have to bite the bullet and do port forwarding. Thanks for the replies.

Dave Kunkel

0 votes
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2013

Hi David,

As Alexey mentioned, you can use HAProxy to forward port 22. See Stash's SSH documentation for more details:

https://confluence.atlassian.com/display/STASH/Setting+up+SSH+port+forwarding

Cheers,

Charles

0 votes
Alexey_Efimov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2013

Yes, you can install frontent (Apache or Nginx) to proxy 80/443 to 7990 port. And also you can use haproxy for forward 22 port to 7999 port.

See prepared Debian package, it make it automatically:

https://bitbucket.org/lelik/atlassian-stash-deb

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events