Solved

Editing the SSHD_CONFIG File in REHL

Posted on 2015-01-14
4
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 62

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

Technology Partners: 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!

Question has a verified solution.

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

Suggested Solutions

We all know how boring and exhausting it is to transfer huge web projects developed locally to a webserver simply via FTP. The File Transfer Protocol is a really nice solution if you need to transfer small amounts of files, but if you're plannin…
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…
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…

696 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