Validate remote access to both modern and legacy hosts by establishing an SSH session with host key verification and then performing a basic Telnet connectivity test. Use clean exits to terminate each session and preserve predictable operator behavior during troubleshooting.
You are working remotely and need to validate access to two
systems: a modern server reached via ssh and a
legacy endpoint that still exposes a Telnet service on port
23. Your goal is to confirm that you can reach the
remote host, accept the SSH host key fingerprint prompt
correctly, exit cleanly, and then perform a Telnet connection
test to verify basic service reachability.
SSH is the standard for secure remote administration. Telnet is insecure and should not be used for sensitive work, but you may still encounter it in legacy environments. In those cases, the most common use is simple reachability testing or confirming that a TCP port is open.
192.168.0.42 as user
admin and accept the host key prompt.
23.
user@host syntax.
ssh admin@192.168.0.42
This starts a secure remote login. On first connection, SSH
prompts to confirm the host key fingerprint. Accepting the
fingerprint adds the host to your known_hosts
file and prevents silent man-in-the-middle changes from
going unnoticed later.
The authenticity of host '192.168.0.42' can't be established.
ECDSA key fingerprint is SHA256:examplekey.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
yes
Warning: Permanently added '192.168.0.42' (ECDSA) to the list of known hosts.
admin@192.168.0.42's password:
Welcome to remote server.
exit
Always exit interactive sessions cleanly. This keeps your operator workflow predictable and prevents “ghost sessions” when you are triaging multiple systems.
Connection closed.
telnet 192.168.0.42 23
Telnet is plaintext and not suitable for secure administration. In modern workflows, it is most commonly used to confirm that a TCP port is reachable and a service is listening.
Trying 192.168.0.42...
Connected to 192.168.0.42.
Escape character is '^]'.
Welcome to Legacy Server.
quit
Terminate the Telnet session cleanly to ensure the remote side closes the connection and returns you to your local shell without ambiguity.
Connection closed by foreign host.
ssh <user>@<host>
: Connects to a remote system securely using the SSH
protocol.
~/.ssh/known_hosts.
exit
: Ends the current interactive shell session (used here to
terminate SSH cleanly).
telnet <host> <port>
: Opens a plaintext TCP session to a host/port (commonly used
for legacy access or basic reachability testing).
quit
: Closes the current Telnet session and returns to the local
shell.