JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1: User Commands     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

User Commands

acctcom(1)

adb(1)

addbib(1)

admin(1)

aedplot(1B)

alias(1)

allocate(1)

amt(1)

appcert(1)

apptrace(1)

apropos(1)

ar(1)

arch(1)

as(1)

asa(1)

at(1)

atoplot(1B)

atq(1)

atrm(1)

audioconvert(1)

audioplay(1)

audiorecord(1)

auths(1)

auto_ef(1)

awk(1)

banner(1)

basename(1)

basename(1B)

batch(1)

bc(1)

bdiff(1)

bfs(1)

bg(1)

bgplot(1B)

biff(1B)

break(1)

cal(1)

calendar(1)

cancel(1)

case(1)

cat(1)

cc(1B)

cd(1)

cdc(1)

cdrw(1)

chdir(1)

checkeq(1)

checknr(1)

chgrp(1)

chkey(1)

chmod(1)

chown(1)

chown(1B)

ckdate(1)

ckgid(1)

ckint(1)

ckitem(1)

ckkeywd(1)

ckpath(1)

ckrange(1)

ckstr(1)

cksum(1)

cktime(1)

ckuid(1)

ckyorn(1)

clear(1)

cmp(1)

cocheck(1F)

cocreate(1F)

codestroy(1F)

col(1)

comb(1)

comm(1)

command(1)

compress(1)

continue(1)

coproc(1F)

coreceive(1F)

cosend(1F)

cp(1)

cpio(1)

cpp(1)

cputrack(1)

crle(1)

crontab(1)

crtplot(1B)

crypt(1)

csh(1)

csplit(1)

ct(1C)

ctags(1)

ctrun(1)

ctstat(1)

ctwatch(1)

cu(1C)

cut(1)

date(1)

dc(1)

deallocate(1)

decrypt(1)

delta(1)

deroff(1)

df(1B)

dhcpinfo(1)

diff(1)

diff3(1)

diffmk(1)

digest(1)

digestp(1)

dircmp(1)

dirname(1)

dirs(1)

dis(1)

disable(1)

dispgid(1)

dispuid(1)

dos2unix(1)

download(1)

dpost(1)

dtappsession(1)

du(1)

du(1B)

dumbplot(1B)

dump(1)

dumpcs(1)

dumpkeys(1)

echo(1)

echo(1B)

echo(1F)

ed(1)

edit(1)

egrep(1)

eject(1)

elfdump(1)

elfedit(1)

elfsign(1)

elfwrap(1)

enable(1)

encrypt(1)

enhance(1)

env(1)

eqn(1)

errange(1)

errdate(1)

errgid(1)

errint(1)

erritem(1)

error(1)

errpath(1)

errstr(1)

errtime(1)

erruid(1)

erryorn(1)

eval(1)

ex(1)

exec(1)

exit(1)

expand(1)

export(1)

exportfs(1B)

expr(1)

expr(1B)

exstr(1)

face(1)

factor(1)

false(1)

fastboot(1B)

fasthalt(1B)

fc(1)

fdformat(1)

fg(1)

fgrep(1)

file(1)

file(1B)

filep(1)

filesync(1)

filofaxp(1)

find(1)

finger(1)

fmlcut(1F)

fmlexpr(1F)

fmlgrep(1F)

fmli(1)

fmt(1)

fmtmsg(1)

fold(1)

for(1)

foreach(1)

franklinp(1)

from(1B)

ftp(1)

ftpcount(1)

ftpwho(1)

function(1)

gcore(1)

gencat(1)

geniconvtbl(1)

genlayouttbl(1)

genmsg(1)

get(1)

getconf(1)

getfacl(1)

getfrm(1F)

getitems(1F)

getlabel(1)

getopt(1)

getoptcvt(1)

getopts(1)

gettext(1)

gettxt(1)

getzonepath(1)

gigiplot(1B)

glob(1)

goto(1)

gprof(1)

graph(1)

grep(1)

groups(1)

groups(1B)

grpck(1B)

hash(1)

hashcheck(1)

hashmake(1)

hashstat(1)

head(1)

help(1)

helpdate(1)

helpgid(1)

helpint(1)

helpitem(1)

helppath(1)

helprange(1)

helpstr(1)

helptime(1)

helpuid(1)

helpyorn(1)

history(1)

hostid(1)

hostname(1)

hp7221plot(1B)

hpplot(1B)

i286(1)

i386(1)

i486(1)

i860(1)

iAPX286(1)

iconv(1)

idnconv(1)

if(1)

implot(1B)

indicator(1F)

indxbib(1)

install(1B)

ipcrm(1)

ipcs(1)

isainfo(1)

isalist(1)

jobs(1)

join(1)

jsh(1)

kbd(1)

kdestroy(1)

keylogin(1)

keylogout(1)

kill(1)

kinit(1)

klist(1)

kmdb(1)

kmfcfg(1)

kpasswd(1)

krb5-config(1)

ksh(1)

ktutil(1)

lari(1)

last(1)

lastcomm(1)

ld(1)

ld(1B)

ldap(1)

ldapadd(1)

ldapdelete(1)

ldaplist(1)

ldapmodify(1)

ldapmodrdn(1)

ldapsearch(1)

ldd(1)

ld.so.1(1)

let(1)

lex(1)

limit(1)

line(1)

lint(1B)

list_devices(1)

listusers(1)

llc2_autoconfig(1)

llc2_config(1)

llc2_stats(1)

ln(1)

ln(1B)

loadkeys(1)

locale(1)

localedef(1)

logger(1)

logger(1B)

login(1)

logname(1)

logout(1)

longline(1F)

look(1)

lookbib(1)

lorder(1)

lp(1)

lpc(1B)

lpq(1B)

lpr(1B)

lprm(1B)

lpstat(1)

lptest(1B)

ls(1)

ls(1B)

m4(1)

mac(1)

mach(1)

machid(1)

madv.so.1(1)

mail(1)

Mail(1B)

mail(1B)

mailcompat(1)

mailp(1)

mailq(1)

mailstats(1)

mailx(1)

make(1S)

man(1)

mconnect(1)

mcs(1)

mdb(1)

mesg(1)

message(1F)

mixerctl(1)

mkdir(1)

mkmsgs(1)

mkstr(1B)

mktemp(1)

moe(1)

more(1)

mp(1)

mpss.so.1(1)

msgfmt(1)

mt(1)

mv(1)

nawk(1)

nca(1)

ncab2clf(1)

ncakmod(1)

neqn(1)

newform(1)

newgrp(1)

news(1)

newsp(1)

newtask(1)

nice(1)

NIS+(1)

nis+(1)

nis(1)

niscat(1)

nischgrp(1)

nischmod(1)

nischown(1)

nischttl(1)

nisdefaults(1)

niserror(1)

nisgrep(1)

nisgrpadm(1)

nisln(1)

nisls(1)

nismatch(1)

nismkdir(1)

nisopaccess(1)

nispasswd(1)

nisrm(1)

nisrmdir(1)

nistbladm(1)

nistest(1)

nl(1)

nm(1)

nohup(1)

notify(1)

nroff(1)

od(1)

on(1)

onintr(1)

optisa(1)

pack(1)

page(1)

pagesize(1)

pargs(1)

passwd(1)

paste(1)

patch(1)

pathchk(1)

pathconv(1F)

pax(1)

pcat(1)

pcred(1)

pdp11(1)

perl(1)

pfcsh(1)

pfexec(1)

pfiles(1)

pfksh(1)

pflags(1)

pfsh(1)

pg(1)

pgrep(1)

pkginfo(1)

pkgmk(1)

pkgparam(1)

pkgproto(1)

pkgtrans(1)

pkill(1)

pktool(1)

plabel(1)

pldd(1)

plimit(1)

plot(1B)

plottoa(1B)

pmap(1)

popd(1)

postdaisy(1)

postdmd(1)

postio(1)

postmd(1)

postplot(1)

postprint(1)

postreverse(1)

posttek(1)

ppgsz(1)

ppriv(1)

pr(1)

praliases(1)

prctl(1)

preap(1)

prex(1)

print(1)

printenv(1B)

printf(1)

priocntl(1)

proc(1)

prof(1)

profiles(1)

projects(1)

prs(1)

prt(1)

prun(1)

ps(1)

ps(1B)

psig(1)

pstack(1)

pstop(1)

ptime(1)

ptree(1)

pushd(1)

pvs(1)

pwait(1)

pwd(1)

pwdx(1)

ranlib(1)

rcapstat(1)

rcp(1)

rdist(1)

read(1)

readfile(1F)

readonly(1)

red(1)

refer(1)

regcmp(1)

regex(1F)

rehash(1)

reinit(1F)

remote_shell(1)

remsh(1)

renice(1)

repeat(1)

reset(1B)

reset(1F)

return(1)

rksh(1)

rlogin(1)

rm(1)

rmail(1)

rmdel(1)

rmdir(1)

rmformat(1)

roffbib(1)

roles(1)

rpcgen(1)

rpm2cpio(1)

rsh(1)

run(1F)

runat(1)

rup(1)

rup(1C)

ruptime(1)

rusage(1B)

rusers(1)

rwho(1)

sact(1)

sag(1)

sar(1)

sccs(1)

sccs-admin(1)

sccs-cdc(1)

sccs-comb(1)

sccs-delta(1)

sccsdiff(1)

sccs-get(1)

sccs-help(1)

sccs-prs(1)

sccs-prt(1)

sccs-rmdel(1)

sccs-sact(1)

sccs-sccsdiff(1)

sccs-unget(1)

sccs-val(1)

scp(1)

script(1)

sdiff(1)

sed(1)

sed(1B)

select(1)

set(1)

set(1F)

setcolor(1F)

setenv(1)

setfacl(1)

setlabel(1)

setpgrp(1)

settime(1)

sftp(1)

sh(1)

shell(1F)

shell_builtins(1)

shift(1)

shutdown(1B)

size(1)

sleep(1)

snca(1)

snmpstatus(1)

soelim(1)

sort(1)

sortbib(1)

sotruss(1)

source(1)

sparc(1)

spell(1)

spellin(1)

spline(1)

split(1)

srchtxt(1)

ssh(1)

ssh-add(1)

ssh-agent(1)

ssh-http-proxy-connect(1)

ssh-keygen(1)

ssh-keyscan(1)

ssh-socks5-proxy-connect(1)

stop(1)

strchg(1)

strconf(1)

strings(1)

strip(1)

stty(1)

stty(1B)

sum(1)

sum(1B)

sun(1)

suspend(1)

svcprop(1)

svcs(1)

switch(1)

symorder(1)

sysV-make(1)

t300(1)

t300(1B)

t300s(1)

t300s(1B)

t4013(1B)

t4014(1)

t450(1)

t450(1B)

tabs(1)

tail(1)

talk(1)

tar(1)

tbl(1)

tcopy(1)

tee(1)

tek(1)

tek(1B)

telnet(1)

test(1)

test(1B)

test(1F)

tftp(1)

time(1)

timemanp(1)

times(1)

timesysp(1)

timex(1)

tip(1)

tnfdump(1)

tnfxtract(1)

touch(1)

touch(1B)

tplot(1)

tput(1)

tr(1)

tr(1B)

trap(1)

troff(1)

true(1)

truss(1)

tset(1B)

tsort(1)

tty(1)

type(1)

typeset(1)

u370(1)

u3b(1)

u3b15(1)

u3b2(1)

u3b5(1)

ucblinks(1B)

ul(1)

ulimit(1)

umask(1)

unalias(1)

uname(1)

uncompress(1)

unexpand(1)

unget(1)

unhash(1)

unifdef(1)

uniq(1)

units(1)

unix2dos(1)

unlimit(1)

unpack(1)

unset(1)

unset(1F)

unsetenv(1)

until(1)

uptime(1)

users(1B)

uucp(1C)

uudecode(1C)

uuencode(1C)

uuglist(1C)

uulog(1C)

uuname(1C)

uupick(1C)

uustat(1C)

uuto(1C)

uux(1C)

vacation(1)

val(1)

valdate(1)

valgid(1)

valint(1)

valpath(1)

valrange(1)

valstr(1)

valtime(1)

valuid(1)

valyorn(1)

vax(1)

vc(1)

vedit(1)

ver(1)

vgrind(1)

vi(1)

view(1)

vipw(1B)

volcancel(1)

volcheck(1)

volmissing(1)

volrmmount(1)

vplot(1B)

vsig(1F)

w(1)

wait(1)

wc(1)

what(1)

whatis(1)

whence(1)

whereis(1B)

which(1)

while(1)

who(1)

whoami(1B)

whocalls(1)

whois(1)

write(1)

xargs(1)

xgettext(1)

xstr(1)

yacc(1)

yes(1)

ypcat(1)

ypmatch(1)

yppasswd(1)

ypwhich(1)

zcat(1)

zlogin(1)

zonename(1)

telnet

- user interface to a remote system using the TELNET protocol

Synopsis

telnet [-8EFKLacdfrx] [-X atype] [-e escape_char] 
     [-k realm] [-l user] [-n file] 
     [ [ [!] @hop1 [@hop2...] @] host [port]]

Description

The telnet utility communicates with another host using the TELNET protocol. If telnet is invoked without arguments, it enters command mode, indicated by its prompt, telnet>. In this mode, it accepts and executes its associated commands. See USAGE. If it is invoked with arguments, it performs an open command with those arguments.

If, for example, a host is specified as @hop1@hop2@host, the connection goes through hosts hop1 and hop2, using loose source routing to end at host. If a leading ! is used, the connection follows strict source routing. Notice that when telnet uses IPv6, it can only use loose source routing, and the connection ignores the !.

Once a connection has been opened, telnet enters input mode. In this mode, text typed is sent to the remote host. The input mode entered will be either “line mode”, “character at a time”, or “old line by line”, depending upon what the remote system supports.

In “line mode”, character processing is done on the local system, under the control of the remote system. When input editing or character echoing is to be disabled, the remote system will relay that information. The remote system will also relay changes to any special characters that happen on the remote system, so that they can take effect on the local system.

In “character at a time” mode, most text typed is immediately sent to the remote host for processing.

In “old line by line” mode, all text is echoed locally, and (normally) only completed lines are sent to the remote host. The “local echo character” (initially ^E) may be used to turn off and on the local echo. (Use this mostly to enter passwords without the password being echoed.).

If the “line mode” option is enabled, or if the localchars toggle is TRUE (the default in “old line by line” mode), the user's quit, intr, and flush characters are trapped locally, and sent as TELNET protocol sequences to the remote side. If “line mode” has ever been enabled, then the user's susp and eof are also sent as TELNET protocol sequences. quit is then sent as a TELNET ABORT instead of BREAK. The options toggle autoflush and toggle autosynch cause this action to flush subsequent output to the terminal (until the remote host acknowledges the TELNET sequence); and to flush previous terminal input, in the case of quit and intr.

While connected to a remote host, the user can enter telnet command mode by typing the telnet escape character (initially ^]). When in command mode, the normal terminal editing conventions are available. Pressing RETURN at the telnet command prompt causes telnet to exit command mode.

Options

The following options are supported:

-8

Specifies an 8-bit data path. Negotiating the TELNET BINARY option is attempted for both input and output.

-a

Attempts automatic login. This sends the user name by means of the USER variable of the ENVIRON option, if supported by the remote system. The name used is that of the current user as returned by getlogin(3C) if it agrees with the current user ID. Otherwise, it is the name associated with the user ID.

-c

Disables the reading of the user's telnetrc file. (See the toggle skiprc command on this reference page.)

-d

Sets the initial value of the debug toggle to TRUE.

-e escape_char

Sets the initial escape character to escape_char. escape_char may also be a two character sequence consisting of ^ (Control key) followed by one character. If the second character is ?, the DEL character is selected. Otherwise, the second character is converted to a control character and used as the escape character. If escape_char is defined as the null string (that is, -e ''), this is equivalent to -e '^@' (Control-@). To specify that no character can be the escape character, use the -E option.

-E

Stops any character from being recognized as an escape character.

-f

Forwards a copy of the local credentials to the remote system.

-F

Forwards a forwardable copy of the local credentials to the remote system.

-k realm

If Kerberos authentication is being used, requests that telnet obtain tickets for the remote host in realm instead of the remote host's default realm as determined inkrb5.conf(4).

-K

Specifies no automatic login to the remote system.

-l user

When connecting to a remote system that understands the ENVIRON option, then user will be sent to the remote system as the value for the ENVIRON variable USER.

-L

Specifies an 8-bit data path on output. This causes the BINARY option to be negotiated on output.

-n tracefile

Opens tracefile for recording trace information. See the set tracefile command below.

-r

Specifies a user interface similar to rlogin. In this mode, the escape character is set to the tilde (~) character, unless modified by the -e option. The rlogin escape character is only recognized when it is preceded by a carriage return. In this mode, the telnet escape character, normally '^]', must still precede a telnet command. The rlogin escape character can also be followed by '.\r' or '^Z', and, like rlogin(1), closes or suspends the connection, respectively. This option is an uncommitted interface and may change in the future.

-x

Turns on encryption of the data stream. When this option is turned on, telnet will exit with an error if authentication cannot be negotiated or if encryption cannot be turned on.

-X atype

Disables the atype type of authentication.

Usage

telnet Commands

The commands described in this section are available with telnet. It is necessary to type only enough of each command to uniquely identify it. (This is also true for arguments to the mode, set, toggle, unset, environ, and display commands.)

auth argument ...

The auth command manipulates the information sent through the TELNET AUTHENTICATE option. Valid arguments for the auth command are as follows:

disable type

Disables the specified type of authentication. To obtain a list of available types, use the auth disable ? command.

enable type

Enables the specified type of authentication. To obtain a list of available types, use the auth enable ? command.

status

Lists the current status of the various types of authentication.

open [-l user ] [ [!] @hop1 [@hop2 ...]@host [ port ]

Open a connection to the named host. If no port number is specified, telnet will attempt to contact a TELNET server at the default port. The host specification may be either a host name (see hosts(4)) or an Internet address specified in the “dot notation” (see inet(7P) or inet6(7P)). If the host is specified as @hop1@hop2@host, the connection goes through hosts hop1 and hop2, using loose source routing to end at host. The @ symbol is required as a separator between the hosts specified. If a leading ! is used with IPv4, the connection follows strict source routing.

The -l option passes the user as the value of the ENVIRON variable USER to the remote system.

close

Close any open TELNET session. An EOF (in command mode) will also close a session and exit.

encrypt

The encrypt command manipulates the information sent through the TELNET ENCRYPT option.

Valid arguments for the encrypt command are as follows:

disable type [input|output]

Disables the specified type of encryption. If you omit the input and output, both input and output are disabled. To obtain a list of available types, use the encrypt disable ? command.

enable type [input|output]

Enables the specified type of encryption. If you omit input and output, both input and output are enabled. To obtain a list of available types, use the encrypt enable ? command.

input

This is the same as the encrypt start input command.

-input

This is the same as the encrypt stop input command.

output

This is the same as the encrypt start output command.

-output

This is the same as the encrypt stop output command.

start [input|output]

Attempts to start encryption. If you omit input and output, both input and output are enabled. To obtain a list of available types, use the encrypt enable ? command.

status

Lists the current status of encryption.

stop [input|output]

Stops encryption. If you omit input and output, encryption is on both input and output.

type type

Sets the default type of encryption to be used with later encrypt start or encrypt stop commands.

quit

Same as close.

z

Suspend telnet. This command only works when the user is using a shell that supports job control, such as sh(1).

mode type

The remote host is asked for permission to go into the requested mode. If the remote host is capable of entering that mode, the requested mode will be entered. The argument type is one of the following:

character

Disable the TELNET LINEMODE option, or, if the remote side does not understand the LINEMODE option, then enter “character at a time” mode.

line

Enable the TELNET LINEMODE option, or, if the remote side does not understand the LINEMODE option, then attempt to enter “old-line-by-line” mode.

isig (-isig)

Attempt to enable (disable) the TRAPSIG mode of the LINEMODE option. This requires that the LINEMODE option be enabled.

edit (-edit)

Attempt to enable (disable) the EDIT mode of the LINEMODE option. This requires that the LINEMODE option be enabled.

softtabs (-softtabs)

Attempt to enable (disable) the SOFT_TAB mode of the LINEMODE option. This requires that the LINEMODE option be enabled.

litecho (-litecho)

Attempt to enable (disable) the LIT_ECHO mode of the LINEMODE option. This requires that the LINEMODE option be enabled.

?

Prints out help information for the mode command.

status

Show the current status of telnet. This includes the peer one is connected to, as well as the current mode.

display

[argument . . . ] Display all, or some, of the set and toggle values (see toggle argument. . .).

?

[command] Get help. With no arguments, telnet prints a help summary. If a command is specified, telnet will print the help information for just that command.

send argument . . .

Send one or more special character sequences to the remote host. The following are the arguments that can be specified (more than one argument may be specified at a time):

escape

Send the current telnet escape character (initially ^]).

synch

Send the TELNET SYNCH sequence. This sequence discards all previously typed, but not yet read, input on the remote system. This sequence is sent as TCP urgent data and may not work if the remote system is a 4.2 BSD system. If it does not work, a lowercase “r” may be echoed on the terminal.

brk or break

Send the TELNET BRK (Break) sequence, which may have significance to the remote system.

ip

Send the TELNET IP (Interrupt Process) sequence, which aborts the currently running process on the remote system.

abort

Send the TELNET ABORT (Abort Process) sequence.

ao

Send the TELNET AO (Abort Output) sequence, which flushes all output from the remote system to the user's terminal.

ayt

Send the TELNET AYT (Are You There) sequence, to which the remote system may or may not respond.

ec

Send the TELNET EC (Erase Character) sequence, which erases the last character entered.

el

Send the TELNET EL (Erase Line) sequence, which should cause the remote system to erase the line currently being entered.

eof

Send the TELNET EOF (End Of File) sequence.

eor

Send the TELNET EOR (End Of Record) sequence.

ga

Send the TELNET GA (Go Ahead) sequence, which probably has no significance for the remote system.

getstatus

If the remote side supports the TELNET STATUS command, getstatus will send the subnegotiation to request that the server send its current option status.

nop

Send the TELNET NOP (No Operation) sequence.

susp

Send the TELNET SUSP (Suspend Process) sequence.

do option
dont option
will option
wont option

Send the TELNET protocol option negotiation indicated. Option may be the text name of the protocol option, or the number corresponding to the option. The command will be silently ignored if the option negotiation indicated is not valid in the current state. If the option is given as help or ?, the list of option names known is listed. This command is mostly useful for unusual debugging situations.

?

Print out help information for the send command.

set argument [value]
unset argument

Set any one of a number of telnet variables to a specific value. The special value off turns off the function associated with the variable. The values of variables may be interrogated with the display command. If value is omitted, the value is taken to be true, or “on”. If the unset form is used, the value is taken to be false, or off. The variables that may be specified are:

echo

This is the value (initially ^E) that, when in “line by line” mode, toggles between local echoing of entered characters for normal processing, and suppressing echoing of entered characters, for example, entering a password.

escape

This is the telnet escape character (initially ^]) that enters telnet command mode when connected to a remote system.

interrupt

If telnet is in localchars mode (see toggle, localchars) and the interrupt character is typed, a TELNET IP sequence (see send and ip) is sent to the remote host. The initial value for the interrupt character is taken to be the terminal's intr character.

quit

If telnet is in localchars mode and the quit character is typed, a TELNET BRK sequence (see send, brk) is sent to the remote host. The initial value for the quit character is taken to be the terminal's quit character.

flushoutput

If telnet is in localchars mode and the flushoutput character is typed, a TELNET AO sequence (see send, ao) is sent to the remote host. The initial value for the flush character is taken to be the terminal's flush character.

erase

If telnet is in localchars mode and operating in “character at a time” mode, then when the erase character is typed, a TELNET EC sequence (see send, ec) is sent to the remote system. The initial value for the erase character is taken to be the terminal's erase character.

kill

If telnet is in localchars mode and operating in “character at a time” mode, then when the kill character is typed, a TELNET EL sequence (see send, el) is sent to the remote system. The initial value for the kill character is taken to be the terminal's kill character.

eof

If telnet is operating in “line by line”/ mode, entering the eof character as the first character on a line sends this character to the remote system. The initial value of eof is taken to be the terminal's eof character.

ayt

If telnet is in localchars mode, or LINEMODE is enabled, and the status character is typed, a TELNET AYT (“Are You There”) sequence is sent to the remote host. (See send, ayt above.) The initial value for ayt is the terminal's status character.

forw1
forw2

If telnet is operating in LINEMODE, and the forw1 or forw2 characters are typed, this causes the forwarding of partial lines to the remote system. The initial values for the forwarding characters come from the terminal's eol and eol2 characters.

lnext

If telnet is operating in LINEMODE or “old line by line” mode, then the lnext character is assumed to be the terminal's lnext character. The initial value for the lnext character is taken to be the terminal's lnext character.

reprint

If telnet is operating in LINEMODE or “old line by line” mode, then the reprint character is assumed to be the terminal's reprint character. The initial value for reprint is taken to be the terminal's reprint character.

rlogin

This is the rlogin escape character. If set, the normal telnet escape character is ignored, unless it is preceded by this character at the beginning of a line. The rlogin character, at the beginning of a line followed by a “.” closes the connection. When followed by a ^Z, the rlogin command suspends the telnet command. The initial state is to disable the rlogin escape character.

start

If the TELNET TOGGLE-FLOW-CONTROL option has been enabled, then the start character is taken to be the terminal's start character. The initial value for the kill character is taken to be the terminal's start character.

stop

If the TELNET TOGGLE-FLOW-CONTROL option has been enabled, then the stop character is taken to be the terminal's stop character. The initial value for the kill character is taken to be the terminal's stop character.

susp

If telnet is in localchars mode, or LINEMODE is enabled, and the suspend character is typed, a TELNET SUSP sequence (see send, susp above) is sent to the remote host. The initial value for the suspend character is taken to be the terminal's suspend character.

tracefile

This is the file to which the output, generated when the netdata or the debug option is TRUE, will be written. If tracefile is set to “-”, then tracing information will be written to standard output (the default).

worderase

If telnet is operating in LINEMODE or “old line by line” mode, then this character is taken to be the terminal's worderase character. The initial value for the worderase character is taken to be the terminal's worderase character.

?

Displays the legal set and unset commands.

slc state

The slc (Set Local Characters) command is used to set or change the state of special characters when the TELNET LINEMODE option has been enabled. Special characters are characters that get mapped to TELNET commands sequences (like ip or quit) or line editing characters (like erase and kill). By default, the local special characters are exported. The following values for state are valid:

check

Verifies the settings for the current special characters. The remote side is requested to send all the current special character settings. If there are any discrepancies with the local side, the local settings will switch to the remote values.

export

Switches to the local defaults for the special characters. The local default characters are those of the local terminal at the time when telnet was started.

import

Switches to the remote defaults for the special characters. The remote default characters are those of the remote system at the time when the TELNET connection was established.

?

Prints out help information for the slc command.

toggle argument...

Toggle between TRUE and FALSE the various flags that control how telnet responds to events. More than one argument may be specified. The state of these flags may be interrogated with the display command. Valid arguments are:

authdebug

Turns on debugging information for the authentication code.

autodecrypt

When the TELNET ENCRYPT option is negotiated, by default the actual encryption (decryption) of the data stream does not start automatically. The autoencrypt (autodecrypt) command states that encryption of the output (input) stream should be enabled as soon as possible.

autologin

If the remote side supports the TELNET AUTHENTICATION option, telnet attempts to use it to perform automatic authentication. If the AUTHENTICATION option is not supported, the user's login name is propagated through the TELNET ENVIRON option. This command is the same as specifying the -a option on the open command.

autoflush

If autoflush and localchars are both TRUE, then when the ao, intr, or quit characters are recognized (and transformed into TELNET sequences; see set for details), telnet refuses to display any data on the user's terminal until the remote system acknowledges (using a TELNET Timing Mark option) that it has processed those TELNET sequences. The initial value for this toggle is TRUE if the terminal user has not done an “stty noflsh”. Otherwise, the value is FALSE (see stty(1)).

autosynch

If autosynch and localchars are both TRUE, then when either the interrupt or quit characters are typed (see set for descriptions of interrupt and quit), the resulting TELNET sequence sent is followed by the TELNET SYNCH sequence. This procedure should cause the remote system to begin throwing away all previously typed input until both of the TELNET sequences have been read and acted upon. The initial value of this toggle is FALSE.

binary

Enable or disable the TELNET BINARY option on both input and output.

inbinary

Enable or disable the TELNET BINARY option on input.

outbinary

Enable or disable the TELNET BINARY option on output.

crlf

Determines how carriage returns are sent. If the value is TRUE, then carriage returns will be sent as <CR><LF>. If the value is FALSE, then carriage returns will be send as <CR><NUL>. The initial value for this toggle is FALSE.

crmod

Toggle RETURN mode. When this mode is enabled, most RETURN characters received from the remote host will be mapped into a RETURN followed by a line feed. This mode does not affect those characters typed by the user, only those received from the remote host. This mode is useful only for remote hosts that send RETURN but never send LINEFEED. The initial value for this toggle is FALSE.

debug

Toggle socket level debugging (only available to the super-user). The initial value for this toggle is FALSE.

encdebug

Turns on debugging information for the encryption code.

localchars

If this toggle is TRUE, then the flush, interrupt, quit, erase, and kill characters (see set) are recognized locally, and transformed into appropriate TELNET control sequences, respectively ao, ip, brk, ec, and el (see send). The initial value for this toggle is TRUE in “line by line” mode, and FALSE in “character at a time” mode. When the LINEMODE option is enabled, the value of localchars is ignored, and assumed always to be TRUE. If LINEMODE has ever been enabled, then quit is sent as abort, and eof and suspend are sent as eof and susp (see send above).

netdata

Toggle the display of all network data (in hexadecimal format). The initial value for this toggle is FALSE.

options

Toggle the display of some internal TELNET protocol processing (having to do with telnet options). The initial value for this toggle is FALSE.

prettydump

When the netdata toggle is enabled, if prettydump is enabled, the output from the netdata command will be formatted in a more user readable format. Spaces are put between each character in the output. The beginning of any TELNET escape sequence is preceded by an asterisk (*) to aid in locating them.

skiprc

When the skiprc toggle is TRUE, TELNET skips the reading of the .telnetrc file in the user's home directory when connections are opened. The initial value for this toggle is FALSE.

termdata

Toggles the display of all terminal data (in hexadecimal format). The initial value for this toggle is FALSE.

verbose_encrypt

When the verbose_encrypt flag is TRUE, TELNET prints out a message each time encryption is enabled or disabled. The initial value for this toggle is FALSE.

?

Display the legal toggle commands.

environ argument . . .

The environ command is used to manipulate variables that may be sent through the TELNET ENVIRON option. The initial set of variables is taken from the users environment. Only the DISPLAY and PRINTER variables are exported by default. Valid arguments for the environ command are:

define variable value

Define variable to have a value of value. Any variables defined by this command are automatically exported. The value may be enclosed in single or double quotes, so that tabs and spaces may be included.

undefine variable

Remove variable from the list of environment variables.

export variable

Mark the variable to be exported to the remote side.

unexport variable

Mark the variable to not be exported unless explicitly requested by the remote side.

list

List the current set of environment variables. Those marked with an asterisk (*) will be sent automatically. Other variables will be sent only if explicitly requested.

?

Prints out help information for the environ command.

logout

Sends the telnet logout option to the remote side. This command is similar to a close command. However, if the remote side does not support the logout option, nothing happens. If, however, the remote side does support the logout option, this command should cause the remote side to close the TELNET connection. If the remote side also supports the concept of suspending a user's session for later reattachment, the logout argument indicates that the remote side should terminate the session immediately.

Files

$HOME/.telnetrc

file that contains commands to be executed before initiating a telnet session

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
network/telnet

See Also

rlogin(1), sh(1), stty(1), getlogin(3C), hosts(4), krb5.conf(4), nologin(4), telnetrc(4), attributes(5), inet(7P), inet6(7P)

Diagnostics

NO LOGINS: System going down in N minutes

The machine is in the process of being shut down and logins have been disabled.

Notes

On some remote systems, echo has to be turned off manually when in “line by line” mode.

In “old line by line” mode, or LINEMODE, the terminal's EOF character is only recognized (and sent to the remote system) when it is the first character on a line.

The telnet protocol only uses single DES for session protection—clients request service tickets with single DES session keys. The KDC must know that host service principals that offer the telnet service support single DES, which, in practice, means that such principals must have single DES keys in the KDC database.