Solved

Editing the SSHD_CONFIG File in REHL

Posted on 2015-01-14
4
216 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

688 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