CACS406 Network Administration

Network AdministrationUnit 411 min read

Remote Admin Tools & Techniques: SSH, Telnet, RDP, SNMP, PowerShell, Puppet

Unit 4 of Network Administration: Explores remote administration tools (SSH, Telnet, RDP, SNMP, PowerShell, Puppet), their protocols, security, automation, and real-world applications in managing servers, networks, and IT infrastructure from afar.

TAKEAWAYS:

  • Remote administration enables IT professionals to manage devices and services securely over networks without physical access.
  • SSH (Secure Shell) and Telnet are terminal-based protocols, but SSH encrypts data, while Telnet is insecure.
  • RDP (Remote Desktop Protocol) and SNMP (Simple Network Management Protocol) are used for graphical interfaces and network monitoring, respectively.
  • PowerShell and Puppet automate tasks and enforce configurations, improving efficiency and consistency.
  • Security and authentication (e.g., SSH keys, passwords, certificates) are critical to prevent unauthorized access.
  • Remote administration is widely used in cloud services, banking systems, and e-commerce platforms like eSewa and Daraz.

1. Introduction to Remote Administration

Remote administration allows IT administrators to manage servers, networks, and devices from a remote location using specialized tools and protocols. This is essential for:

  • Centralized management of distributed systems.
  • Troubleshooting without on-site visits.
  • Automation of repetitive tasks.
  • Security monitoring and compliance enforcement.

Key Concepts

  • Remote access: Connecting to a device over a network (LAN/WAN/Internet).
  • Authentication: Verifying user identity (passwords, SSH keys, certificates).
  • Encryption: Securing data in transit (e.g., SSH, TLS).
  • Automation: Scripting and configuration management (e.g., Puppet, Ansible).

2. Remote Administration Protocols and Tools

2.1 Terminal-Based Protocols

SSH (Secure Shell)

SSH is a cryptographic network protocol for secure remote login and command execution. It encrypts all traffic, preventing eavesdropping or tampering.

How SSH Works

  1. A client initiates a connection to the server.
  2. The server authenticates the client (via password or SSH key).
  3. An encrypted session is established for secure communication.
sequenceDiagram
    participant Client
    participant Server
    Client->>Server: SSH Handshake (Port 22)
    Server-->>Client: Challenge (Password/Key)
    Client-->>Server: Credentials
    Server-->>Client: Encrypted Session

Advantages

  • Encrypted communication.
  • Secure file transfer (via SCP or SFTP).
  • Works over untrusted networks (e.g., the Internet).

Disadvantages

  • Requires proper key management.
  • Performance overhead due to encryption.

Example Command

ssh user@remote_server_ip
Telnet

Telnet is an unencrypted terminal emulation protocol for remote login. It sends data in plaintext, making it vulnerable to attacks.

How Telnet Works

  1. Client connects to the server on port 23.
  2. No encryption; credentials are sent in plaintext.
  3. Session is established without security checks.
Port 23 (Unencrypted)ClientServer
Telnet connection (no encryption, plaintext credentials)

Advantages

  • Simple to set up.
  • Works on legacy systems.

Disadvantages

  • Insecure: Credentials and data are exposed.
  • Deprecated: Most modern systems avoid Telnet due to security risks.

Example Command

telnet remote_server_ip

2.2 Graphical Remote Access

RDP (Remote Desktop Protocol)

RDP is a proprietary protocol developed by Microsoft for remote graphical interfaces. It allows users to interact with a remote computer as if they were sitting in front of it.

How RDP Works

  1. Client connects to the server via port 3389.
  2. Server sends a graphical session (desktop, apps, files).
  3. Inputs (keyboard/mouse) are relayed to the server.
ClientRDP RequestNetworkData StreamServerGraphical Session
RDP data flow: client-server graphical session over port 3389

Advantages

  • Full desktop access.
  • Supports multiple monitors and audio.
  • Used in enterprise environments (e.g., banks, government).

Disadvantages

  • Security risks: Requires VPN or firewall rules to restrict access.
  • Performance overhead: High bandwidth usage.

Example Command (Windows)

mstsc remote_server_ip

2.3 Network Monitoring and Management

SNMP (Simple Network Management Protocol)

SNMP is used to monitor and manage network devices (routers, switches, servers). It relies on agents (on devices) and a management station (NMS).

How SNMP Works

  1. Agent on the device collects data (e.g., CPU, memory, traffic).
  2. Manager (NMS) queries the agent via GET requests.
  3. Agent responds with TRAPs (asynchronous alerts) or SET commands (for configuration changes).
SNMP GET/SET (Port 161)TRAP (Alert)Manager (NMS)Agent (Device)
SNMP communication: Manager queries Agent, Agent sends TRAPs

Advantages

  • Centralized monitoring.
  • Supports SNMPv3 (secure authentication and encryption).

Disadvantages

  • SNMPv1/v2 are insecure (community strings are plaintext).
  • Requires proper configuration to avoid misuse.

Example Command (Linux)

snmpwalk -v 2c -c public localhost

3. Automation and Configuration Management

PowerShell

PowerShell is a task automation and configuration management framework from Microsoft. It supports remote administration via WinRM (Windows Remote Management).

08162431Verb4 bitsNoun8 bitsParameters20 bits
PowerShell cmdlet structure (e.g., Get-Service)

Key Features

  • Cmdlets: Pre-built commands for administration (e.g., Get-Service, Restart-Service).
  • Scripting: Automate repetitive tasks (e.g., backups, user management).
  • Remote Execution: Run commands on remote machines.

Example Command (Remote Execution)

Invoke-Command -ComputerName remote_server -ScriptBlock { Get-Service }

Puppet

Puppet is an open-source configuration management tool that enforces desired states on servers. It uses a master-agent architecture.

How Puppet Works

  1. Puppet Master stores configuration files (manifests).
  2. Agents (servers) pull configurations and apply changes.
  3. Idempotency: Ensures systems remain in the desired state.
Applied Config (Idempotent)Agent 1Applied Config (Idempotent)Agent 2Puppet Master
Puppet Master pushes manifests to Agents (idempotent state enforcement)

Advantages

  • Consistency: Enforces uniform configurations.
  • Auditability: Tracks changes via logs.
  • Scalable: Manages hundreds of servers.

Disadvantages

  • Learning curve: Requires understanding of Puppet DSL.
  • Overhead: Frequent pulls can impact performance.

4. Security Considerations

Remote administration introduces security risks if not configured properly. Key considerations:

  • Authentication: Use SSH keys instead of passwords.
  • Encryption: Always prefer SSH over Telnet.
  • Firewall Rules: Restrict access to trusted IPs.
  • Least Privilege: Grant only necessary permissions.
  • Audit Logs: Monitor for suspicious activity.
02.557.510SSH10Telnet0RDP (Default)5SNMPv38
Security risk comparison (1-10 scale, 10=most secure)

Example: Secure SSH Setup

# Generate SSH key pair
ssh-keygen -t ed25519

# Copy public key to server
ssh-copy-id user@remote_server

5. Real-World Applications

In the Real World

  1. eSewa (Nepal)

    • Idea: Uses SSH and SNMP to monitor and secure its backend servers.
    • How: SSH encrypts admin access to payment gateways, while SNMP monitors transaction servers for downtime.
  2. Daraz (Nepal)

    • Idea: RDP and Puppet manage its order-processing servers.
    • How: RDP allows tech teams to debug live orders remotely, while Puppet ensures all servers have the same e-commerce software version.
  3. NTC (Nepal Telecommunications Authority)

    • Idea: PowerShell automates network device configurations.
    • How: PowerShell scripts push firmware updates to thousands of routers across Nepal without manual intervention.
  4. Google Cloud Platform (Worldwide)

    • Idea: SSH and SNMP secure and monitor virtual machines.
    • How: Engineers use SSH to debug VMs, while SNMP alerts them to traffic spikes in data centers.

6. Worked Example: Remote Server Troubleshooting

Scenario: A web server (web-server.example.com) is down. Use remote tools to diagnose the issue.

Step 1: Check Connectivity

ping web-server.example.com
  • If ping fails, check network connectivity (firewall, DNS, routing).
  • If ping succeeds, proceed to Step 2.

Step 2: SSH into the Server

ssh admin@web-server.example.com
  • If SSH fails, verify:
    • Server is reachable (telnet web-server.example.com 22).
    • SSH service is running (sudo systemctl status ssh).
    • Firewall allows port 22 (sudo ufw allow 22).

Step 3: Check Services

sudo systemctl status apache2
  • If Apache is down, restart it:
    sudo systemctl restart apache2
    

Step 4: Monitor with SNMP

snmpwalk -v 2c -c public web-server.example.com
  • Check for high CPU/memory usage or disk errors.

7. Comparison Table: Remote Administration Tools

Tool/Protocol Purpose Security Use Case Port
SSH Secure remote login Encrypted Server administration 22
Telnet Unencrypted remote login Insecure Legacy systems (avoid) 23
RDP Remote desktop access Encrypted (if VPN) Windows server management 3389
SNMP Network monitoring SNMPv3 (secure) Router/switch management 161
PowerShell Automation & scripting Depends on WinRM Windows server automation 5985/5986
Puppet Configuration management Secure (if TLS) Enforcing server consistency N/A

8. Exam Tip

  • For short-answer questions (5 marks):

    • Explain how a tool works (e.g., SSH handshake, SNMP GET/SET).
    • Mention security risks (e.g., Telnet’s plaintext credentials).
    • Give one real-world example (e.g., Puppet in Daraz’s servers).
  • For long-answer questions (10 marks):

    • Compare two tools (e.g., SSH vs. RDP) using a table.
    • Describe a troubleshooting workflow (e.g., ping → SSH → service check).
    • Discuss security best practices (e.g., SSH keys, firewall rules).
  • For command-based questions (5 marks):

    • Write 3-4 correct commands (e.g., ssh, snmpwalk, mstsc).
    • Explain what each command does (e.g., snmpwalk fetches device stats).

Visual Recap

Based on the TU BCA syllabus for Network Administration (CACS406), unit 4.

Discussion

Loading…