Lab
Tenlet:-
User interface to the TELNET protocol. telnet command belongs to DAPRA command set, allow you to log on to remote machine. It is used for interactive communication with remote host. When telnet command with host IP address hit on command line it open telnet command prompt & require a password to login to another host machine. As long as we logged in with remote machine your machine is act like dumb terminal it just provide interface to logged in to remote machine.
With escape character there is facility we can switch between remote machine & local machine .Default Escape character : " Ctrl + ] " Once you press this you can work with your local machine just at start of every command you have to press exclamatory mark '!' . we can end remote session with exit command after that we bacl to our local machine.
Telnet not secure - everything is sent in plain text be it over a local network or over the Internet. So any one can hack your information including your password. It is old - text based only, there are no graphics provided.
telnet is not in built functionality we have to install it from yum or apt repository.
Yum install telnet
Apt-get install telnet.
Usage:-
telnet [-468ELadr] [-S tos] [-b address] [-e escapechar] [-l user] [-n tracefile] [host [port]]
1. telnet IP_addr
ex. telnet 192.168.2.5
with this command your able to login to remote machine provided login infirmation & password. your local machine provide a terminal to work on remote machine using telnet command.
2. telnet -4/6 IP_addr
Force IPv4/IPv6 address resolution.
3. telnet -E IP_addr
it disables the escape character functionality.If ths functionality removes it is not possible to swich between remote machine & local machine.
4. telnet -l [user_name] IP_addr
ex. telnet -l ashu 192.168.2.5
with this "-l" option we can login to remote host with specific user name which must me present at remote machine. with this command it directly promt you for password as it already have user name with it.
5. telnet -e [escapechar] IP_addr
with this we can change the default escape character with new one as you specifies in command.
6. telnet -r IP-addr
Emulate rlogin(1). In this mode, the default escape character is a tilde. Also, the interpretation of the escape character is changed: an escape character followed by a dot causes telnet to disconnect from the remote host. A ^Z instead of a dot suspends telnet, and a ^] (the default telnet escape character) generates a normal telnet prompt. These codes are accepted only at the beginning of a line.
7. telnet IP_addr port [port_no]
By default telnet uses port 23. we can change port or service by this command as we want.
8. telnet -n tracefile IP_addr
It is used to record trace information in file we specified on command line. but to record trace information it is neccesary to set trace file first.