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命令的基本指南和一些常见技巧。