After the Java project is ready, the final deployment usually uses securecrt (or other terminals) to connect to Linux and upload the war package. It is necessary to learn several basic Linux commands.
1. Ssh settings on centos
1.1 In the terminal window, Log On As root and modify hosts. Allow to allow remote connection.
VI/etc/hosts. Allow
PressISwitch the key to insert mode and add a sentence to the last line
Sshd: All
Then Press ESC to return to the command mode, then press: To start the last line mode, and finally enterXSave and exit (Note: if the file is read-only, you can tryChmod + W hosts. AllowGrant write permission), you can useTail/etc/hosts. AllowCheck whether the file content is correct
1.2 Restart sshd
/Etc/rc. d/init. d/sshd restart
After restart, remote connection should be allowed.
Ii. SSH connection to centos on Mac
Mac terminal command line, enter
SSH username @ server-IP
Note: Here, username is replaced with the relative user name according to the actual situation, and server-IP is the IP address of centos.
Iii. Use seceurecrt to connect to centos in Windows
Graphic Interface, everyone on earth understands
3.1 upload files
Rz command
3.2 download an object
SZ command
3.3 view the Directory
LS command
Ls-l (can also be abbreviated to LL)