0

Gday Everyone,

i am using ssh with jumphost(s).

ssh -J zone1-jumphost zone2-target

or .ssh/config:

HOST zone1-* zone2-* !zone1-jumphost
   ProxyJump zone1-jumphost

All servers (jumphost(s) and target) are configured to print out an issue message like "Authorized access only!". I can suppress the target servers message with the option '-q'.

But how can i suppress the message created by the jumphost(s)?

EnlightMe
  • 200
  • 2
  • 9

1 Answers1

2

You can create an empty file on the target server in your users home directory called ~/.hushlogin and it will stop the message of the day from displaying.

Just connect and run touch ~/.hushlogin and the next time you log in it should be suppressed.

jjbmiller
  • 38
  • 1
  • 1
  • 5
  • It does not really solves my problem. It suppresses the /etc/motd, but not the /etc/issue, and does not suppress anything coming from the jumphost. – EnlightMe Mar 16 '22 at 05:57
  • Ah ok, in that case try running `ssh -o loglevel=ERROR` on your local host before connecting. – jjbmiller Mar 16 '22 at 11:55
  • As before this also has no effect to the output coming from the jumpserver. It works only for the target's output. – EnlightMe Mar 16 '22 at 15:18
  • 1
    Understood. I just mocked this up in my lab and I was able to get it working. Add this line to the top of your ~/.ssh/config file on your local machine: `LogLevel ERROR` Then run your ssh command `ssh -J jump-server remote-server` – jjbmiller Mar 16 '22 at 16:25