0

I have a Linux server running SSH service. I have a custom message which needs to be displayed when an user logs in using putty. The required screenshot is attached here Can any one tell me how to achieve the same ?

A.Kumar
  • 43
  • 6
  • 1
    screen shot seems to be missing, I think you need something like `motd` – dlmeetei Jul 18 '17 at 04:57
  • Depends on whether this is specific to a user or not. If it is user specific, then your would need to amend /home/username/.profile or /home/username/.bashrc. – Raman Sailopal Jul 18 '17 at 08:13
  • Stackoverflow is for help with software development. You should consider asking this on [unix.se] or [sf]. – Kenster Jul 18 '17 at 13:38

2 Answers2

3

To display Welcome or Warning message for SSH users before login. Use issue.net file

vi /etc/issue.net

Add the banner message of your choice, and save the file

vi /etc/ssh/sshd_config

Search for the word 'Banner'

Change #Banner /some/path To Banner /etc/issue.net

service sshd restart
Prakash
  • 163
  • 8
1

There are many tutorials explaining how to do this in detail, but the tl;dr version is this:

You need to edit two files:

  • /etc/motd (Message of the Day)
  • /etc/ssh/sshd_config : Change the setting PrintLastLog to "no", this will disable the "Last login" message.

And then restart your sshd. SOURCE

Hope it helps

cosinepenguin
  • 1,545
  • 1
  • 12
  • 21