Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”
For Windows users, there are many resources available to upload files to the server, such as Xshell, XFTP and other visual control of the server. However, for MAC users, it is not easy to find an alternative to Xshell, which is not easy to use or cumbersome to use. Small editor found that IDEA has SSH connection, you can also use IDEA to manage files and upload them to the server.
Open IDEA to set up a separate empty package as server management, only need to upload files into the package can be.
Idea >> Tools >> Deployment >> Configuration The Configuration page is displayed
Click the plus sign to display configuration server information. We select the SFTP file upload mode and name the alias set for the current production server
Input necessary information:
-
SFTP host IP address of the server.
-
Port. The Port number
-
Root path Default upload path
-
User Name User name for logging in to the server
-
Auth type Indicates the authorization mode. This section uses the password authorization mode
-
Password. Password for logging in to the server
After entering the required information, click Test SFTP Connection to Test the connection
Run Tools >> Start SSH to enable SSH remote connection. After you tap SSH, the configured SSH information is displayed
After the link is successful, the Terminal of idea displays the successful link information
Select the CONFIGURED SSH server under Configuration and enter the Mappings folder to configure the upload path and local file storage path
After configuration, right-click the project and you can see an Upload server button to upload the file to the server
The effect after uploading.
At this point, SSH is remotely connected through IDEA and files are uploaded to the server. You can use it if you need it