Portál AbcLinuxu, 18. listopadu 2026 14:58


Dotaz: SSHD - banner

11.8.2007 10:50 muficek | skóre: 17 | blog: Muficek | Hradec Králové
SSHD - banner
Přečteno: 1030×
Odpovědět | Admin
Ahoj, mám tento "problém".
Rád bych docílil toho, aby když se přihlásím přes putty ke svému serveru, tak aby se jako první zobrazil banner a hned pod ním login následovaný heslem.

V tuto chvíli mi to funguje, ale jinak, než si představuju. To znamená, že nejdřív zadám login, pak se zobrazí banner, který je následován dotazem na heslo.

Já to potřebuji v pořadí: 1=banner, 2=login, 3=heslo.

Poradíte prosím ?
Děkuji.
login as: root
VMware Server version 1.0.3 Build 44356
kernel 2.6.9-55.0.2.ELsmp

root@10.0.0.94's password:

Last login: Sat Aug 11 10:56:55 2007
[root@vmware ~]#
Můj /etc/ssh/sshd_config
[root@vmware ~]# cat /etc/ssh/sshd_config
#       $OpenBSD: sshd_config,v 1.69 2004/05/23 23:59:53 dtucker Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

Port 8992
Protocol 2
ListenAddress 10.0.0.94
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 1h
ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

LoginGraceTime 10m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
PermitEmptyPasswords no
PasswordAuthentication yes

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
#UsePAM no
UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#ShowPatchLevel no

# no default banner path
Banner /etc/issue.sshd

# override default of no subsystems
Subsystem       sftp    /usr/libexec/openssh/sftp-server
[root@vmware ~]#

Věřící mohou mluvit o velkém štěstí, že Ježíš byl ukřižován. Kdyby ho např. utopili, museli by nosit na krku akvárko :-)
Nástroje: Začni sledovat (1) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

H0ax avatar 11.8.2007 11:00 H0ax | skóre: 36 | blog: Odnikud_nikam
Rozbalit Rozbalit vše Re: SSHD - banner
Odpovědět | | Sbalit | Link | Blokovat | Admin
Tak si ten login nastav do puttyny předem a pak se to zeptá akorát na heslo. Jinak si myslím, že to nepůjde.
uid=0(root) gid=0(root) skupiny=0(root)
11.8.2007 11:24 muficek | skóre: 17 | blog: Muficek | Hradec Králové
Rozbalit Rozbalit vše Re: SSHD - banner
Viděl jsem, že to jde, bohužel už nevím u koho. Řešení přes Putty není na místě.
Věřící mohou mluvit o velkém štěstí, že Ježíš byl ukřižován. Kdyby ho např. utopili, museli by nosit na krku akvárko :-)
11.8.2007 15:49 Jaris | skóre: 19 | blog: Jaris
Rozbalit Rozbalit vše Re: SSHD - banner
Odpovědět | | Sbalit | Link | Blokovat | Admin
na http://www.cyberciti.biz/tips/how-to-force-sshd-server-to-display-login-banner-before-login-change-the-ssh-server-sshd-login-banner.html sa pise

Please note that this feature may not work with third party ssh client such as Putty.
11.8.2007 17:55 Radek Hladik | skóre: 20
Rozbalit Rozbalit vše Re: SSHD - banner
Odpovědět | | Sbalit | Link | Blokovat | Admin
Osobne mam pocit, ze to je vec puttyho, protoze dotaz na uziv. jmeno je plne v rezii puttyho. Tzn kdy se putty rozhodne zobrazit banner a kdy se zeptat na heslo zavisi jen na nem.... Ale nijak podrobne jsem to nezkoumal, takze se muzu mylit...

Radek
Shadow avatar 11.8.2007 18:23 Shadow | skóre: 25 | blog: Brainstorm
Rozbalit Rozbalit vše Re: SSHD - banner
Taky mám ten pocit. Dotaz na uživatelské jméno podle mého není v režii sshd, to je věc klienta.
If we do not believe in freedom of speech for those we despise we do not believe in it at all.

Založit nové vlákno • Nahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.