Transfer file from desktop machine to remote server
How to transfer files from the user's desktop to remote servers using Ezeelogin GUI?
This feature is available from Ezeelogin version 7.29.2. Refer below article to upgrade the current Ezeelogin installation to the latest version.
Some PHP versions have issues when using key-based authentication. Change key-based authentication to password-based to fix the error "Error: SSH authentication failed".
In order for key-based authentication to work, make sure to install libssh version 1.10.0. Refer below article to compile and install libssh version 1.10.0.
How to compile and install libssh (1.10.0) and php-ssh2 (1.3.1)?
1. Install ssh2 PHP module using the below command (replace PHP version).
[email protected] ~]# apt update ; apt upgrade
[email protected] ~]# apt install php7.4-ssh2 -y
Make sure php-ssh2 version is greater than or equal to 1.3.1. Run below command to check php-ssh2 and libssh versions.
[email protected] ~]# dpkg -l | grep ssh
[email protected] ~]# php -i | grep -i ssh
2. Add php-ssh2 extension in php.ini (replace PHP version).
[email protected] ~]# echo "extension=ssh2.so" >> /etc/php/7.4/cli/php.ini
[email protected] ~]# echo "extension=ssh2.so" >> /etc/php/7.4/apache2/php.ini
3. Restart the apache webserver and access Ezeelogin GUI.
[email protected] ~]# systemctl restart apache2
Upload Files from your Desktop to remote servers via Ezeelogin GUI
Click on the File Upload icon and choose a file from the client machine. Provide a Remote Path where the file needs to be copied and then click on the Upload button.
File upload can be done in the directories where users have the privilege. The remote user can be specified in Edit Server -> Remote SSH login user / RDP login user
Download Files from the remote servers to your desktop via Ezeelogin GUI
Click on the File download icon and provide the Remote Path where the file is located and then click on the Download button.
How to grant privileges for gateway users to transfer files to the remote servers?
1. Allow users to access the servers. Refer to the below screenshot.
2. Edit privilege for that user and allow Web File Transfer to enable File Upload for that user. Refer below screenshot.
Common errors in Ezeelogin GUI while file uploading to the remote server.
1. Error: Remote file open failed
The above error occurs when the remote SSH user has no privilege to write on the specified remote path.
2. Error: SSH authentication failed
a) The above error occurs when the gateway server is not able to connect to the remote server with the remote username specified while adding the server.
b) The servers added with the key will show the above error (only in specific PHP versions).
How to view detailed logs of file uploads done by the gateway users?
Login to Ezeelogin GUI and navigate to Users -> Web Activity. Select Gateway user from User and Servers from Section.
1. In the below example, ezadmin user uploaded the file ssh2-1.3.1.tgz to the remote path /root/ssh2-1.3.1.tgz of the server production.server.
2. In the below example, alex user tried to upload a file to the remote path which has no access. Error message "Remote file open failed".