Solved

Editing the SSHD_CONFIG File in REHL

Posted on 2015-01-14
4
191 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
ID: 40549140
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
ID: 40549270
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
ID: 40549316
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
ID: 40557163
This single edit is easy:
echo  Ciphers aes128-ctr,aes192-ctr,aes256-ctr  >> /etc/ssh/sshd_config
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Utilizing an array to gracefully append to a list of EmailAddresses
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…

930 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