[CentOS] centos7 :: ks.cfg :: customisation of sshd

Fri Feb 19 17:31:57 UTC 2016
Mike - st257 <silvertip257 at gmail.com>

On Thu, Feb 18, 2016 at 1:49 PM, Gordon Messmer <gordon.messmer at gmail.com>
wrote:

> On 02/18/2016 10:27 AM, Mike - st257 wrote:
>
>> ( You forgot to escape the space before 60000 in the first sed expression
>> you provided. )
>>
>
> True, but you shouldn't need to escape spaces at all:
>

Right, I notice that now.
And those expressions can be combined in one string and not two
expressions. ;-)


>
> sed -i 's/#Port 22/Port 60000/; s/#PermitRootLogin yes/PermitRootLogin
> yes/'
>
> Though I will note there is some sort of syntax error with the
>> PermitRootLogin sed expression (present in the original you provided). I
>> spent a moment looking at it and the problem with that second expression
>> evades me right now.
>>
>
> I ran the command he provided and didn't see a problem.  What did you see?


I know I saw an error message yesterday, but I don't see one now (ran it
without the "in place" replace option as a test). *shrugs* Now I look like
I'm seeing things. :-/

Thank goodness it's Friday.

-- 
---~~.~~---
Mike
//  SilverTip257  //