Go Premium for a chance to win a PS4. Enter to Win


Installing and configuring SSH on Linux

Posted on 2000-02-29
Medium Priority
Last Modified: 2010-03-18
Does anybody know how to install and configure SSH and be able to enable it through the firewall(Linux running ipchains)?

Question by:samcumar
  • 4
  • 2
  • 2
  • +2

Expert Comment

ID: 2572813
Sure, somebody knows. But you should explain what exactly you want to do. And at what point you have stopped.

Questions for you for start:
1) do you want to install ssh on firewall machine or on one behind it;
2) where do you need to connect using ssh (select all that apply):
  a) to firewall from inside;
  b) to firewall from outside;
  c) to internal from outside;
  d) from inside mashine to outside server;
  e) from firewall to outside server;
  f) from firewall to inside server.
3) what version of Linux you are running;
4) are you ready to use ./configure;make;make install or you want to get everything precompiled?

Expert Comment

ID: 2573579
I guess, as long as you do ACCEPT TCP port 22, the default port for SSH.

Author Comment

ID: 2574634
These are the Answers to your question:-

1) I want to install ssh on my firewall and also on my webserver

2) The options that I choose are (b), (c) & (f)

3) (i) The firewall is running RedHat 5.2 but I upgraded the kernel to 2.2.12.
(ii) The webserver is running redhat 5.2 kernel ver 2.0.36 but I will be upgrading it to redhat 6.2 very soon.

(4) This is where I'm confused at the moment and I couldn't understand fully the README file for SSH.
What do I need to do here?

Thanks in advance for your help.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 2575476
Are you just asking how to ssh to a machine behind the firewall?

Accepted Solution

monas earned 300 total points
ID: 2575488
OK, question #5 is what version of ssh you trying to install.

Assuming  you installing 1.2.27 - then installation instructions are not in file README, but in file INSTALL. At the very begining of the file are three lines:

make install

these are the commands you need to invoke (all of them will require some time to complete and produce lot of output). Yes - there are lots of options for configure, but default set produces secure and reasonable configuration. Go with default. And if you will want to change something - you will be able rerun from the very begining.

When make install will complete - you will have software installed. To check that, you need to start ssh daemon (sshd), and then invoke "ssh localhost". [If] you succeed - you will arange sshd to start on every reboot of computer authomagically.

Do all this on internal server. When you are done with local installation you will be ready for enabling option (f). Assuming you have working configuration for your web connections from outside on your firewall check out /etc/ipchains.rules. There should be lines with 80:80 in them - double those and substitute 80:80 with 22:22 - as jyu_88 said - ssh works on port 22, and this way you will allow connections to it. Then run "/usr/bin/ipchains-restore < /etc/ipchains.rules"

When you'll find this working - add rules on firewall to
b) accept connections from everythere to port 22 on firewall;
d) if you don't do masquerading from internal network for all protocols - you should add rule to masquerade 22 port from your internal server to outside

Good Look!

Author Comment

ID: 2578587
Thanks Monas,

The version of ssh I downloaded is 2.0.13. So I have to look at the README file then.

I shall try out on this Saturday. I will let you know if it works or not.

Thanks for your help.

Expert Comment

ID: 2578721
SSH2 with protocol 2.0 version above has license problem if you donot limit it to personal/home use. For free one, you have to stick to SSH1 with protocol version 1.50 and package version 1.2.27 (then you need to compile with RSAref instead of RSA, also you need to patch RSAref and ssh according to CERT warning)

Author Comment

ID: 2578854
Thanks for the update.
LVL 40

Expert Comment

ID: 2583260
You might also take a look at the new Universal SSH (http://www.ssh.com/). I know that it is/will be free for educational institutes and the current beta if free for all use.

Author Comment

ID: 2610549
Thanks for the answer Monas, it worked. Though I struggled it finally worked.

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Integration Management Part 2
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question