Solved

Editing the SSHD_CONFIG File in REHL

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS RDS 3 83
Convert curl speed_dwonload to Mbps 29 113
Issue with cURL on Windows 7 92
Linux  Script File Attributes 5 61
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…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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…

813 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