opcja w shell
Moderatorzy: Moderatorzy, Administratorzy
opcja w shell
Cześć
mam takie pytanie jak zrobić w ssh takie coś że user loguje się do na konto przez shell i na przywitanie widzi wiadomość np . cześć feos albo coś innego czy to się robi przez skrypt czy to jest ta funkcja w jakimś config'u proszę o pomoc,
mam takie pytanie jak zrobić w ssh takie coś że user loguje się do na konto przez shell i na przywitanie widzi wiadomość np . cześć feos albo coś innego czy to się robi przez skrypt czy to jest ta funkcja w jakimś config'u proszę o pomoc,
Ostatnio zmieniony 2008-06-07, 14:30 przez F.E.O.S, łącznie zmieniany 1 raz.
[b]Jabber[/b] : feos@jabber.org
[b]Nie jest sztuką zainstalować Slackware ale sztuką jest go z konfigurować prawidłowo...
Slackware dla wybranych.[/b]
[b]Nie jest sztuką zainstalować Slackware ale sztuką jest go z konfigurować prawidłowo...
Slackware dla wybranych.[/b]
Re: opcja w shell
Dodajesz sobie do .bashrc to co ma się wykonać przy zalogowaniu.
Re: opcja w shell
Opcja Banner w sshd_config. Podajesz ścieżkę do pliku, który będzie wyświetlany przy logowaniu, bez różnicy na używanego shella.
Na marginesie: zmień temat postu, bo ten zupełnie nie ma nic wspólnego z twoim pytaniem.
Na marginesie: zmień temat postu, bo ten zupełnie nie ma nic wspólnego z twoim pytaniem.
[url=http://bdtk.sourceforge.net][img]http://pin.if.uz.zgora.pl/~beton/bdt-ready.png[/img][/url] #337142
--------------------------------------------
"I had a letter in the post today. It said 'Gas Bill'. It sounds a tempting offer." -- Alan Cox
"Users have been trained that when a computer bluescreens and losing all of their data, it's either (a) just the way things are, or (b) it's microsoft's fault." -- Theodore Tso
--------------------------------------------
"I had a letter in the post today. It said 'Gas Bill'. It sounds a tempting offer." -- Alan Cox
"Users have been trained that when a computer bluescreens and losing all of their data, it's either (a) just the way things are, or (b) it's microsoft's fault." -- Theodore Tso
Re: opcja w shell
difrost,
w którym miejscu w stawić ten plik on może być txt
Kod: Zaznacz cały
/etc/ssh/ nano sshd_config
# Package generated configuration file
# See the sshd(8) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
[b]Jabber[/b] : feos@jabber.org
[b]Nie jest sztuką zainstalować Slackware ale sztuką jest go z konfigurować prawidłowo...
Slackware dla wybranych.[/b]
[b]Nie jest sztuką zainstalować Slackware ale sztuką jest go z konfigurować prawidłowo...
Slackware dla wybranych.[/b]
Re: opcja w shell
Odkomentuj i podaj scieżkę do wybranego przez siebie pliku tekstowego...F.E.O.S pisze:Kod: Zaznacz cały
#Banner /etc/issue.net
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.
-- Dennis Ritchie
Linux Registered User #419452
-- Dennis Ritchie
Linux Registered User #419452
Re: opcja w shell
TU działanie pliku banner jak widzimy pokazuje on jakis opis przed zalogwaniem sie na maszyne
a tu /etc/motd czyli juz po podaniu hasla i zalogowaniu sie na shella
Kod: Zaznacz cały
bash-3.1# ssh 127.0.0.1 -l test
Welcome to server.
lalallalalla
test@127.0.0.1's password:
a tu /etc/motd czyli juz po podaniu hasla i zalogowaniu sie na shella
Kod: Zaznacz cały
test@127.0.0.1's password:
Witam na serwerze :)
-------------------------------------------------
Administrator
test
test@test:~$
Ostatnio zmieniony 2008-06-25, 15:00 przez h4rt, łącznie zmieniany 1 raz.