When you want to manage the files of your VMwar ESXi hypervisor, you can use WinSCP without any problem.
However, if you try to connect via SFTP to your VMware vCenter Server (or VCSA) using WinSCP, you will see that this will not work by default.
However, this can be useful, for example, to change the SSL certificate used by default on this server.
You launch WinSCP and attempt to connect to your VMware vCenter Server (or VCSA) via SFTP protocol.
Several windows appear, then an error occurs:
Plain Text
Received unexpected packet in response to authentication request, type 14066632 (unknown). Authentication log (see session log for details): Using username "root". VMware vCenter Server Appliance 6.7.0.45100.
Open WinSCP and enter this in the connection window:
Then, click on the button: Advanced.
In the "Advanced Site Settings" window that appears, go to the section: Environment -> SFTP.
In the "SFTP server" box, specify the value "shell /usr/libexec/sftp-server".
Then, click OK.
Then click the "Save" button.
Indicate under what name you want to save this connection information and the advanced configuration used.
Note that by default, the password will not be saved (unless you check the "Save password (not recommended)" box).
Once the session is saved, click on the button: Login.
Skip the authentication dialog by checking the "Never show this banner again" box and then clicking Continue.
Indicate the password of the "root" account used.
The session starts.
And the connection to your VMware vCenter Server (or VCSA) succeeded.
By default, you will find yourself in the "root" folder (which corresponds to the personal folder of the "root" user).
If you go to the root through the ".." folder, you will see this.
The "Received unexpected packet in response..." error you receive with WinSCP is because the appliancesh defaults to the "root" user instead of the Linux BASH Shell.
You can easily check this by connecting via SSH to your VMware vCenter Server Appliance (VCSA) server.
Once logged in as root, you will see this appear:
Plain Text
Connected to service * List APIs: "help api list" * List Plugins: "help pi list" * Launch BASH: "shell" Command>
VMware even tells you that to use the BASH Shell, you must first type the "shell" command.
To resolve this issue directly on your VMware vCenter Server Appliance (VCSA) server, simply change the user's default Shell so that the BASH Shell is used by default instead of the "appliancesh".
To do this, access your server's BASH shell by typing:
Bash
shell
Which will display this:
Plain Text
Shell access is granted to root root@vcsa [ ~ ]#
Next, change the default Shell of the "root" user permanently to BASH Shell:
Bash
chsh -s /bin/bash root
Now, you can connect to your VMware vCenter Server Appliance (VCSA) server using SFTP via WinSCP without getting the error mentioned above.
Once you are done with WinSCP, don't forget to restore the original Shell (VCSA appliance shell):
Bash
chsh -s /bin/appliancesh root
VMware 2/24/2023
VMware 3/10/2023
VMware 5/31/2024
VMware 7/3/2024
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
You must be logged in to post a comment