SSH(Secure Shell)是一種用于加密客戶端與服務器之間鏈接的加密協議,客戶端與服務器的每一次交互都被加密。以下是在Ubuntu系統中使用SSH命令的基本方法和一些使用技巧:
sudo apt update
sudo apt install openssh-server
sudo apt install openssh-client
sudo systemctl start ssh
sudo systemctl stop ssh
sudo systemctl restart ssh
ssh username@ip_address
ssh -p port_number username@ip_address
免密登錄:
生成密鑰對:
ssh-keygen -t rsa
ssh-copy-id username@ip_address
sudo systemctl status ssh
sudo ufw allow ssh
scp username@ip_address:/path/to/remote/file /path/to/local/destination
scp /path/to/local/file username@ip_address:/path/to/remote/destination
exit
以上信息提供了在Ubuntu系統中使用SSH命令的基本指南和一些常見技巧。