Schlagwort-Archive: telnet

telnet – Kommandos und Optionen sind mir immer noch nützlich

Immer wieder nützlich, daher notiere ich sie mir schnell.

telnet> ?

close   	close current connection
logout  	forcibly logout remote user and close the connection
display 	display operating parameters
mode    	try to enter line or character mode ('mode ?' for more)
open    	connect to a site
quit    	exit telnet
send    	transmit special characters ('send ?' for more)
set     	set operating parameters ('set ?' for more)
unset   	unset operating parameters ('unset ?' for more)
status  	print status information
toggle  	toggle operating parameters ('toggle ?' for more)
slc     	set treatment of special characters

z       	suspend telnet
environ 	change environment variables ('environ ?' for more)

Zum Beispiel um einen Email-Server zu testen.
telnet
telnet> open mail.irendwer.irgendeine 25
Connectet to …
EHLO mail.irendwer.irgendeine

250-mail.irendwer.irgendeine
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
Man kann sich dann anmelden mit
AUTH LOGIN

und wird nach dem Benutzernamen gefragt. Der ist dann im base 64 Format (es gibt auch andere encoder online) einzugeben, ebenso wie das Kennwort.
Mit
MAIL FROM:<sender@domain.com> ENTER kann man bei Erlaubnis (sonst weigert sich der SMTP) RCPT TO:<recipient@remotedomain.com> ENTER den Empfänger eingeben. Ist der Empfänger empfangsbereit kommt keine Fehlermeldung und man kann mit DATA den Text eingeben. Nach ENTER gibt man einen Punkt ein (.) ENTER und schon sollte die E-Mail unterwegs sein, was der telnet-client telnet auch anzeigt.

Man kann damit auch den „TCP Port 80 (https) Zugriff mit telnet überprüfen“.

Package für Debian, Ubuntu und als RPM.

Telnet auf Wickipedia macht auch schlau und wenn ich mehr wissen will, lese ich die Ausgabe von

telnet> set ?
echo            character to toggle local echoing on/off
escape          character to escape back to telnet command mode
rlogin          rlogin escape character
tracefile       file to write trace information to
                
                The following need 'localchars' to be toggled true
flushoutput     character to cause an Abort Output
interrupt       character to cause an Interrupt Process
quit            character to cause an Abort process
eof             character to cause an EOF 
                
                The following are for local editing in linemode
erase           character to use to erase a character
kill            character to use to erase a line
lnext           character to use for literal next
susp            character to cause a Suspend Process
reprint         character to use for line reprint
worderase       character to use to erase a word
start           character to use for XON
stop            character to use for XOFF
forw1           alternate end of line character
forw2           alternate end of line character
ayt             alternate AYT character

autoflush       enable flushing of output when sending interrupt characters
autosynch       enable automatic sending of interrupt characters in urgent mode
skiprc          enable don't read the telnetrc files
binary          enable sending and receiving of binary data
inbinary        enable receiving of binary data
outbinary       enable sending of binary data
crlf            enable sending carriage returns as telnet <CR><LF>
crmod           enable mapping of received carriage returns
localchars      enable local recognition of certain control characters

debug           enable debugging
netdata         enable printing of hexadecimal network data (debugging)
prettydump      enable output of "netdata" to user readable format (debugging)
options         enable viewing of options processing (debugging)
termdata        enable (debugging) toggle printing of hexadecimal terminal data
?               display help information

das Linux Manual mit „man telnet“:

TELNET(1) BSD General Commands Manual TELNET(1)

NAME
telnet — user interface to the TELNET protocol

SYNOPSIS
telnet [-468ELadr] [-S tos] [-b address] [-e escapechar] [-l user]
[-n tracefile] [host [port]]

DESCRIPTION
The telnet command is used for interactive communication with another
host using the TELNET protocol. It begins in command mode, where it
prints a telnet prompt („telnet> „). If telnet is invoked with a host
argument, it performs an open command implicitly; see the description
below.
telnet – Kommandos und Optionen sind mir immer noch nützlich weiterlesen