Solved

Editing the SSHD_CONFIG File in REHL

Posted on 2015-01-14
4
186 Views
Last Modified: 2015-04-14
Hello Experts!

    I have a quick question on editing the sshd_config file in RedHat.  What I'm trying to do is add the ciphers option in the sshd_config by adding the following line:   Ciphers aes128-ctr,aes192-ctr,aes256-ctr

    Pardon my ignorance here, I'm rather new to the Linux world.   When editing the sshd_config file, I assume that I can add that line anywhere within the sshd_config file?   Once I've added that line, is there a particular command needed to save my work?  

 Basically, what I'm doing now to "attempt" this is this:   I'll log in as Root, then will do a:  # vim /etc/ssh/sshd_config it will open and ask me if I want to Open, Delete, Edit, etc the file.  I choose "E" for Edit, then I went in and added the line: Ciphers aes128-ctr,aes192-ctr,aes256-ctr at the very bottom of the config file, then will click the X to close out of the session, thinking it would save my changes.  When I try and go back into the sshd_config file, it's telling me that it's detected a SWP file and I cannot see the line:  Ciphers aes128-ctr,aes192-ctr,aes256-ctr that I added to it, it's reverting back.    Thank you in advance for your help!
0
Comment
Question by:itsmevic
4 Comments
 
LVL 19

Assisted Solution

by:NickUpson
NickUpson earned 125 total points
Comment Utility
assuming you are using vi to edit the file, the command to write the file is :w

the x is crashing out instead of writing your changes, I suggest a tutorial on vi (or vim) before you go ANY further as this is your primary tool for changing files and a basic understanding of how to use it is a must.
0
 
LVL 12

Assisted Solution

by:Kent W
Kent W earned 125 total points
Comment Utility
As a beginner, I would suggest using the text editor "nano".  

nano sshd_config

All of the options are then on a menu at the bottom.
Generally you can add options anywhere, it just depends on how you want to organize, and preference.

Once you save the new edits, you just then need to restart sshd service to make them effective.
0
 
LVL 23

Assisted Solution

by:savone
savone earned 125 total points
Comment Utility
After you during the file hit escape to get out of edit mode then type :wq to write the file and quit the editor.
0
 
LVL 61

Accepted Solution

by:
gheist earned 125 total points
Comment Utility
This single edit is easy:
echo  Ciphers aes128-ctr,aes192-ctr,aes256-ctr  >> /etc/ssh/sshd_config
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now