LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Secure Shell Server Configuration Help (https://www.linuxquestions.org/questions/linux-server-73/secure-shell-server-configuration-help-574781/)

Peter_APIIT 08-04-2007 11:00 PM

Secure Shell Server Configuration Help
 
Hello all expert Linux administrator, i truly noob to Linux world.

I am a IT student. Therefore, i would like to learn how to configure ssh server. I have putty and ssh installed bu ti don't know how to configure it.

I have google it but i don't really understand.

Therefore, i post this thread in order to get some simple help.

Thanks for your help.

Your help is greatly appreciated by me and others.

camh 08-05-2007 12:13 AM

The configuration file should be at /etc/ssh/sshd_config

AlucardZero 08-05-2007 09:18 AM

man sshd_config

mehxh1979 08-06-2007 01:53 AM

use keygen-ssh command

Peter_APIIT 08-07-2007 12:37 AM

Can u show me some step by step guide ?

adam_blackice 08-07-2007 01:15 AM

you can configure it by editing the file /etc/ssh/sshd_config you can find there various of options to enable and disable it

AlucardZero 08-07-2007 07:46 AM

camh and I gave you all the information you `should` need. combine that with Google and you should be golden. We're not here to hold your hand, so instead of waiting to see if some other poster will decide to, you should do the reading we've pointed you at and try to do it yourself. You'll learn far more that way.

b0uncer 08-07-2007 08:03 AM

Quote:

camh and I gave you all the information you `should` need. combine that with Google and you should be golden. We're not here to hold your hand, so instead of waiting to see if some other poster will decide to, you should do the reading we've pointed you at and try to do it yourself. You'll learn far more that way.
True, but instead of just saying "here's a coin, go make a million out of it" you should throw at least one or two instant-helpful things, because after all this is a forum where it's usual that those with knowledge share it with those who don't. LQ isn't a school, it's a Linux-related forum. For schoolworks there are different "rules" about how the answers should be given (because in that case the student should do her/his own work, and the teachers should aid the student in doing that, but not do it for the student). I doubt setting up an SSH server is a schoolwork (or if it is, I believe the student should already be familiar with the simple things such as man-pages or configuration files), so there's no point in being difficult.

For a start: there are several text-editors in your system, which you can use to edit plain-text configuration files. sshd ("SSH server") has it's configuration settings in a plain-text file /etc/ssh/sshd_config that you can edit. The editor you choose is not important, but editing sshd configuration can't be done as unprivileged user, so you need to edit the file as root. This can be achieved in several ways, but basically you'll just need to get a text editor open with root privileges, then open the file mentioned earlier, do the changes, save and exit. From the commandline this should do (because vi or vim is a text editor found in almost if not every UNIX[-like] system): open a terminal emulator, or log into a console, and command this
Code:

su
*type root password here, it's not displayed on the screen while typing*
vi /etc/ssh/sshd_config

Now the file should be opened in front of you. Press 'i' to activate INSERT mode (at first Vi(m) is in command mode where you can't write). Use arrows to go around the file, delete, write and replace whatever you want. Once finished, press ESC (to get back to command mode), then type
Code:

:wq
to write-quit (save the file, then exit the editor) and you're done.

The file is somewhat self-descriptive, but if you want more information, you can do a web search. Also the man pages found on most if not all UNIX[-like] systems may help you out; commanding the previously mentioned line like below shows you (if available) the man page of sshd_config configuration file:
Code:

man sshd_config
Use arrow keys to scroll, q to quit.

I'm not 100% sure (can't remember, actually) if you need to restart the sshd service after editing the configuration, but it doesn't harm to do that. This depends a bit on the system, so in this case you will want to consult your distributions' website, help documentation or just do a web search for how to start, stop and restart (in this case restart) services on the system.


All times are GMT -5. The time now is 07:59 PM.