A
A
apaicer2019-03-12 16:53:53
linux
apaicer, 2019-03-12 16:53:53

Script when connecting to ssh with name output?

Is it possible to make a script, before authorization, that will report, like hello $user?
i tried but it just outputs the text.

#!/bin/bash
echo "hello $1"

How to write a script correctly to display the name of the plug-in. And how, after logging in, to make a script for the occupied number of ram or hdd, load averege?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2019-03-12
@apaicer

scripts executed at session start are located in /etc/profile.d/
such a script /etc/profile.d/1uptime.sh displays some system parameters when logging in either via ssh or via the local shell.
plus ~/.profile plus ~/.bashrc - read and understand.

D
Dmitry, 2019-03-12
@Tabletko

After login - motd

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question