1. install Ssh-server in ubuntu for remote login
A) installation:sudo apt-get install openssh-server
b) Open service:sudo/etc/init.d/ssh start
Then confirm that the Sshserver is started:
Ps-e |grep SSH
If only ssh-agent that Ssh-server has not started, need to/etc/init.d/ssh start, if you see the sshd that shows that Ssh-server has been started.
Ssh-server configuration file is located in/Etc/ssh/sshd_config, where you can define the SSH service port, the default port is 22, you can define yourself as a different port number, such as 222. Then restart the SSH service:
Sudo/etc/init.d/ssh Resar
Start SSH
Sudo/etc/init.d/ssh start
To turn on remote access Port 22 in the firewall
Test if you can connect
Enter the name in Ubuntu
SSH [email protected]
Set up a firewall to open the relevant port
1. Installation
sudo apt-get install UFW
2. Enable
sudo UFW enable
sudo ufw default deny
After running the above two commands, the firewall is turned on and turned on automatically when the system starts. All external access to the native is turned off, but the native access is normal externally.
3. Turn ON/off
sudo ufw allow|deny [service]
4. View firewall status
sudo UFW status
Putty access to Ubuntu on Windows