Problem Statement
What is SSH used for in Linux?
Explanation
SSH (Secure Shell) provides secure encrypted remote access to Linux systems over networks. It replaces insecure protocols like telnet and rlogin, encrypting all traffic including authentication credentials. Basic usage: ssh username@hostname connects to remote host, prompting for password or using SSH keys for authentication.
SSH enables remote command execution: ssh user@host 'command' runs command on remote host without interactive login. Port forwarding: ssh -L local_port:remote_host:remote_port creates secure tunnel for services. SCP and rsync use SSH for secure file transfer. SSH is fundamental for remote system administration, especially in cloud and DevOps environments.
Key-based authentication is more secure than passwords: generate keys with ssh-keygen, copy public key to remote host with ssh-copy-id user@host, then login without password. Configure SSH in /etc/ssh/sshd_config including port, allowed users, root login permission, and key-only authentication. Understanding SSH is critical for managing remote Linux servers securely.
