≡ Menu

login banner

Q. How can I configure or change the Virtual Console login to display a pre-login message?

A. The file /etc/issue is a text file which contains a message or system identification to be printed before the login prompt. It may contain various @char and \char sequences, if supported by getty.

Just open file /etc/issue and change the text as per your requirements.

Procedure to change /etc/issue - pre login file

Login as the root user. Open a file
# vi /etc/issue
Append new text as follows:
Welcome to nixCraft Labs!
Today is \d \t @ \n

Save and close the file. \d, \t or \n will expand as follows on run time.

/etc/issue - escape code

The issue-file (/etc/issue or the file set with the -f option) may contain certain escape codes to display the system name, date and time etc. All escape codes consist of a backslash (\) immediately followed by one of the letters explained below.

  • \b : Insert the baudrate of the current line.
  • \d : Insert the current date.
  • \s : Insert the system name, the name of the operating system.
  • \l : Insert the name of the current tty line.
  • \m : Insert the architecture identifier of the machine, eg. i486
  • \n : Insert the nodename of the machine, also known as the hostname.
  • \o : Insert the domainname of the machine.
  • \r : Insert the release number of the OS, eg. 1.1.9.
  • \t : Insert the current time.
  • \u : Insert the number of current users logged in.
  • \U : Insert the string "1 user" or " users" where is the number of current users logged in.
  • \v : Insert the version of the OS, eg. the build-date etc.

See also

Q. I have just installed Ubuntu 6.06 and I would like to allow remote login to my system from home via ssh. How do I install and configure SSH server?

A. OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions.

Ubuntu SSHD Installation

Type the following two command to install both ssh client and server:
# sudo apt-get install openssh-server openssh-client

SSHD Configuration

To be frank your server is ready by default. Just test it from your home computer or from same system with the command:
# ssh localhost
OR
# ssh user@your-server-ip-address

How do I use ssh client?

Assuming that your server hostname is userver.mydomain.com and username is vivek, you need to type the following command:
# ssh vivek@userver.mydomain.com
To stop ssh server, enter:
# sudo /etc/init.d/ssh stop
To start sshs server, enter:
# sudo /etc/init.d/ssh start
To restart ssh server, enter:
# sudo /etc/init.d/ssh restart

See also: