Forum Discussion
tmsh sshd banner-text multi line
9 Replies
- Hitesh_Patel_34Historic F5 AccountHi 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 - Nick_T_68319
Nimbostratus
Perfect, thank you! - smp_86112
Cirrostratus
I use this command:tmsh modify sys sshd banner-text '"This is a wrapped banner"' - Forrest_30133
Nimbostratus
SMP,
How do you apply that command without the system taking a return at the end of the first line?
thanks, - smp_86112
Cirrostratus
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. - Forrest_30133
Nimbostratus
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)" - smp_86112
Cirrostratus
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. - smp_86112
Cirrostratus
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. - Joe_Carrigan_10
Nimbostratus
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 1line 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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
