Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

just a little question

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
24 posts • Page 1 of 1
Author
Message
wonker
n00b
n00b
User avatar
Posts: 19
Joined: Fri Jun 24, 2005 1:05 am
Location: Glasgow

just a little question

  • Quote

Post by wonker » Wed Aug 17, 2005 6:03 pm

hey,

Ive been messing about with my computer, you know, having a look at stuff and wondering what to play with next, and ive found something i want ssh to do but i havent found any docs specific to my question.

You know when you type
$ ssh [hostname] -l [username]
Well, some of my freinds have a message that comes up before you login saying stuff like
Dear Mr Hacker,

A script on this machine has automatically posted your IP address on over 200 hacker sites.

Good luck with that
So far, ive found the /etc/motd file where it gives you a message AFTER you login, but ive found nothing relating to the message before you login. I know this is a simple little question, but its one of those ones that i wont be able to leave until i get it. 8O its driving me nuts
If its not on fire, its a software issue 8)
Top
D2T
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 96
Joined: Mon Mar 07, 2005 6:54 pm
Location: Behind You

  • Quote

Post by D2T » Wed Aug 17, 2005 6:07 pm

http://gentoo-wiki.com/TIP_Console_Prompt


hint: /etc/issue files
Top
wonker
n00b
n00b
User avatar
Posts: 19
Joined: Fri Jun 24, 2005 1:05 am
Location: Glasgow

  • Quote

Post by wonker » Wed Aug 17, 2005 6:09 pm

excellent :D


cheers buddy
If its not on fire, its a software issue 8)
Top
funkyrikg
n00b
n00b
User avatar
Posts: 27
Joined: Wed Aug 17, 2005 10:36 am
Location: Glasgow, Scotland

  • Quote

Post by funkyrikg » Wed Aug 17, 2005 10:58 pm

Came across this thread and was instantly curious. I have tried using the example from the tip documentation. And in the main it works, but I can't get the escape characters to work when I log in I get the output below.

Is this what should happen with ssh? Or is there something I'm missing in my config? Not majorily important, but would be a nice to have.

Code: Select all


      __q@@@@m_
     _q@@@@@@@@@@_
    _@@@@@@@@@@@@@@m
   q@@@@@@@@@@@@@@@@@_
  _@@@@@@@@@@##@@@@@@@h      Hostname:  \n
  @@@@@@@@@@@ ##@@@@@@@@_    OS:        Gentoo \s
  7##@@@@@@@___@@@@@@@@@@,   Kernel:    \r
    ####@@@@@@@@@@@@@@@@@@   Processor: \m
      ####@@@@@@@@@@@@@@@@   Memory:    516220 kB
       q@@@@@@@@@@@@@@@@#W   Terminal:  \l
      q@@@@@@@@@@@@@@@@@@/
    _@@@@@@@@@@@@@@@@#@@
   q@@@@@@@@@@@@@@@#@##^
  m#@@@@@@@@@@@@@@#@#W
 _q@@@@@@@@@@@@@#@#*>
  p@@@@@@@@@@@#@##%
   _##@@@@@##@#@#g
     _#@@@@@@#@@
       _p@@@@q
Regards
Rik Gordon
Registered Linux User #365284
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Thu Aug 18, 2005 12:08 am

Hmm, I tried it out, but it doesn't give that prompt when I ssh in.
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
m_sqrd
Guru
Guru
Posts: 367
Joined: Mon Jul 18, 2005 7:38 pm

  • Quote

Post by m_sqrd » Thu Aug 18, 2005 12:39 am

better hint
grep -i banner /etc/ssh/sshd_config
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Thu Aug 18, 2005 4:50 am

I checked out banner...

Banner /etc/issues
did nothing...but maybe I should try it from a remote system.

EDIT: Just tried on my other system, and I don't get any messages, just the plain old Password: prompt :(
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
bone
Apprentice
Apprentice
User avatar
Posts: 255
Joined: Fri Jun 07, 2002 4:00 pm
Location: Midwest, USA

  • Quote

Post by bone » Thu Aug 18, 2005 8:17 am

Did you restart sshd after you changed the Banner variable? This config is not dynamic, and is only read at startup.


jt

Cinder6 wrote:I checked out banner...

Banner /etc/issues
did nothing...but maybe I should try it from a remote system.

EDIT: Just tried on my other system, and I don't get any messages, just the plain old Password: prompt :(
Top
funkyrikg
n00b
n00b
User avatar
Posts: 27
Joined: Wed Aug 17, 2005 10:36 am
Location: Glasgow, Scotland

  • Quote

Post by funkyrikg » Thu Aug 18, 2005 8:19 am

This is the line I have in my sshd_config:

Code: Select all

Banner /etc/issue.logo
Remember to ensure that the file exists, otherwise nothing will happen, though I am having strange results (escape characters not working). Colours don't work when I hit the box direct from PuTTY (best terminal emulator ever) on my Window$ machine.

I'm not convinced I can get this to work with my set up. But if anyone has a suggestion, I'd be pleased to hear it, my knowledge of agetty is non-existent at the moment.
Regards
Rik Gordon
Registered Linux User #365284
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Thu Aug 18, 2005 6:03 pm

Okay, I will try that when I get back on the system in question. Right now it is pointing to a symlink, so maybe that is the problem.
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Thu Aug 18, 2005 11:35 pm

Okay, I have changed Banner to "Banner /etc/issues.logo"...still no go :(
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
christsong84
Veteran
Veteran
User avatar
Posts: 1003
Joined: Sun Apr 06, 2003 10:04 pm
Location: GMT-8 (Spokane)

  • Quote

Post by christsong84 » Thu Aug 18, 2005 11:39 pm

Cinder6 wrote:Okay, I have changed Banner to "Banner /etc/issues.logo"...still no go :(
I assume the /etc/issues.logo file contains what you want displayed? Simple but always check those things :P
while(true) {self.input(sugar);} :twisted:
Top
m_sqrd
Guru
Guru
Posts: 367
Joined: Mon Jul 18, 2005 7:38 pm

  • Quote

Post by m_sqrd » Thu Aug 18, 2005 11:46 pm

what in the file ?
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Fri Aug 19, 2005 5:28 am

It is the standard /etc/issues.logo file. You should have one, as well. It has a purple ASCII Gentoo logo, then the login.
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
Jeremy_Z
l33t
l33t
User avatar
Posts: 671
Joined: Mon Apr 05, 2004 3:21 pm
Location: Shanghai

  • Quote

Post by Jeremy_Z » Fri Aug 19, 2005 6:40 am

Just tried this. Adding Banner /etc/issue.logo, the restart sshd, then logging (from localhost).
I have the Gentoo purple logo before asking password, so that works, but the escaped characters after the logo are displayed just like that ( This is \n.\O (\s \m \r) \t ), so i guess they do not work there.
"Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Fri Aug 19, 2005 7:09 am

I don't get any unique prompt at all. Just says "Password:".
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
Jeremy_Z
l33t
l33t
User avatar
Posts: 671
Joined: Mon Apr 05, 2004 3:21 pm
Location: Shanghai

  • Quote

Post by Jeremy_Z » Fri Aug 19, 2005 7:14 am

Hum, just to clarify : it is /etc/issue.logo, NOT /etc/issues.logo
"Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals
Top
m_sqrd
Guru
Guru
Posts: 367
Joined: Mon Jul 18, 2005 7:38 pm

  • Quote

Post by m_sqrd » Fri Aug 19, 2005 2:48 pm

The escape codes are only used by [a]getty so banner just show them as text.
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Fri Aug 19, 2005 5:28 pm

It is issue.logo? Hmm, I will check that out when I get the chance.
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Sun Aug 21, 2005 5:39 am

Okay, I had pointed to /etc/issues.logo, and not /etc/issue.logo. Thanks!
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
calubro
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Sat May 14, 2005 10:44 am
Location: vienna

  • Quote

Post by calubro » Sat Aug 27, 2005 8:19 am

*ahem* stupid question ... but why do i get the logo AFTER typing the username?

Code: Select all

login as: root
[0;35;40m                                           .
[0;35;40m     .vir.                                d$b
[0;35;40m  .d$$$$$$b.    .cd$$b.     .d$$b.   d$$$$$$$$$$$b  .d$$b.      .d$$b.
[0;35;40m  $$$$( )$$$b d$$$()$$$.   d$$$$$$$b Q$$$$$$$P$$$P.$$$$$$$b.  .$$$$$$$b.
[0;35;40m  Q$$$$$$$$$$B$$$$$$$$P"  d$$$PQ$$$$b.   $$$$.   .$$$P' `$$$ .$$$P' `$$$
[0;35;40m    "$$$$$$$P Q$$$$$$$b  d$$$P   Q$$$$b  $$$$b   $$$$b..d$$$ $$$$b..d$$$
[0;35;40m   d$$$$$$P"   "$$$$$$$$ Q$$$     Q$$$$  $$$$$   `Q$$$$$$$P  `Q$$$$$$$P
[0;35;40m  $$$$$$$P       `"""""   ""        ""   Q$$$P     "Q$$$P"     "Q$$$P"
[0;35;40m  `Q$$P"                                  """
[0;37;40m

This is \n.\O (\s \m \r) \t

Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Password:
Last login: Fri Aug 26 15:50:33 2005 from 192.168.1.2
also the "This is \n.\O (\s \m \r) \t" does not work :cry:

Code: Select all

grep -i banner /etc/ssh/sshd_config
# no default banner path
Banner /etc/issue.logo
the file /etc/issue.logo:

Code: Select all

server ~ # cat /etc/issue.logo
                                           .
     .vir.                                d$b
  .d$$$$$$b.    .cd$$b.     .d$$b.   d$$$$$$$$$$$b  .d$$b.      .d$$b.
  $$$$( )$$$b d$$$()$$$.   d$$$$$$$b Q$$$$$$$P$$$P.$$$$$$$b.  .$$$$$$$b.
  Q$$$$$$$$$$B$$$$$$$$P"  d$$$PQ$$$$b.   $$$$.   .$$$P' `$$$ .$$$P' `$$$
    "$$$$$$$P Q$$$$$$$b  d$$$P   Q$$$$b  $$$$b   $$$$b..d$$$ $$$$b..d$$$
   d$$$$$$P"   "$$$$$$$$ Q$$$     Q$$$$  $$$$$   `Q$$$$$$$P  `Q$$$$$$$P
  $$$$$$$P       `"""""   ""        ""   Q$$$P     "Q$$$P"     "Q$$$P"
  `Q$$P"                                  """


This is \n.\O (\s \m \r) \t
g.cal
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Sat Aug 27, 2005 5:08 pm

Try /etc/motd to get it after you log in.
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
calubro
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Sat May 14, 2005 10:44 am
Location: vienna

  • Quote

Post by calubro » Sun Aug 28, 2005 2:43 pm

ok .. i tried nothing, and everthing was left like it is listed above, but as i found out, it does not work throug putty, but it works at a "direct" login at the server.
g.cal
Top
Cinder6
l33t
l33t
User avatar
Posts: 767
Joined: Thu Aug 05, 2004 4:33 am
Location: California
Contact:
Contact Cinder6
Website

  • Quote

Post by Cinder6 » Sun Aug 28, 2005 4:10 pm

Correct. It would appear it doesn't work through putty.
Knowledge is power.
Power corrupts.
Study hard.
Be evil.

Ugly Overload
Top
Post Reply

24 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic