tmsh sshd banner-text multi line

I used to be able to do this with bigpipe, but now I can’t figure out how to make a multi line banner text. Can anyone point me in the right direction?

Hi Nick,

This should get you going:

[root@ve4:Active] config tmsh

root@ve4(Active)(/Common)(tmos) edit /sys sshd all-properties

The command above will open the config section in the ‘vim’ editor. It will look like this:

modify sshd {

allow replace-all-with { ALL }

banner disabled

banner-text none

description none

inactivity-timeout 0

include none

log-level info

login enabled

}

You want to modify it to look like this:

modify sshd {

allow replace-all-with { ALL }

banner enabled

banner-text "Multi

Line

Banner"

description none

inactivity-timeout 0

include none

log-level info

login enabled

}

To save hit ESC twiced they type :wq

Then type a ‘y’ to confirm the changes in tmsh

Perfect, thank you!

I use this command:

tmsh modify sys sshd banner-text '"This
is
a
wrapped
banner"'

SMP,

How do you apply that command without the system taking a return at the end of the first line?

thanks,

Not sure I understand what you mean. If you don’t want the wraps, you put it all on a single line like this:

tmsh modify sys sshd banner-text '"This is a SSH banner"'

Is that what you mean? If you want the wraps, you enter CRLFs where you want them, like in the sample command I initially provided. My sample was from 10.2.x, not sure what may have changed in v11.

Sorry I was not clear. I was more specifically looking for what a CRLF looked like in TMSH.

tmsh modify sys sshd banner-text '"TEST (crlf)

Banner (crlf)

Multi (crlf)

Line"’

So what would go in place of the “(crlf)”

I execute this command from the unix shell, not inside TMSH. Since I’m using single quotes, unix simply accepts the enter key as a CRLF character until I close the command with a final trailing single quote. I don’t believe I’ve ever tried this command from within TMSH. If I get a minute here soon, I’ll try it out.

I did not have much luck within TMSH, but I also find TMSH very difficult to work in. Maybe someone with better skillz will step in and help.

If you are entering the commands from the command line, as opposed to editing the section of the configuration you may need to use two commands. One to change the text:

tmsh modify sys sshd banner-text '"multiline text line 1

line 2 "’

and one to enable the banner:

tmsh modify sys sshd banner enable.

It may also be helpful to point out that the format for the multiline input opened with a single quote, then a double quote, and closed with a double quote then a single quote.