One of the many and easiest ways to get the logs from the ESXi hosts and vCenter Server Appliance (VCSA), is accessing directly to the files directory using tools such as WinSCP, which helps to transfer the files between a local and a remote computer ( Ex. VCSA).
"SCP is an older protocol but almost universally supported on Unix-like platforms as part of an SSH protocol suite. It is rarely supported on other platforms. SCP is a descendant of the ancient rcp.”
Here, you can download WinSCP.
I never have had issues with the ESXi hosts and WinSCP, however, trying to access the VCSA is a different story.
Unable to Access the VCSA via WinSCP
Trying to establish a connection to the VCSA 6.7 using WinSCP client, I was getting the following error: "Host is not communicating for more than 15 seconds. Still Waiting..."
And after a few seconds, I got this other message: "Received too large SFTP packet. Max supported packet size is 1024000 B"
The default Appliance Shell cannot be used to access remotely via WinSCP. You must enable the Bash shell on the appliance.
There are two workarounds to solve this issue, and the first one is easier than the second. However, the first option didn’t work for me.
If you have the same issue, try first option one.
- Open WinSCP and open a new session.
- On the new session Login window, click Advanced...
- Select SFTP under Environment.
- On SFTP server input: shell /usr/lib64/ssh/sftp-server
- Click OK.
Update from the comments: On the SFTP server field, the input should be: shell /usr/libexec/sftp-server. I haven't tried, but it should work. This is the quickest and ideal option. If you still have an issue, try option two.
If you try the connection to VCSA again, you should be able to connect. I couldn't, so I used the below option two.
- Access to the (VCSA) the Appliance Management. https://vcsa_ip:5480
- Navigate to Access and click Edit under Access Settings.
- Switch on Enable SSH Login and click OK.
Note: Enabling the Bash Shell here is not going to work.
- Access to the VCSA via SSH.
- Type: Shell
- Change the default Shell to Bash typing: chsh -s /bin/bash root
After enabling Bash Shell, you could use WinSCP to access your files in the VCSA.
Thanks for your explenation. I had to go for the second as well.
Afterwards I felt pretty stupid since the Nuggetslab I was using explained.
Anyhow this made me solve it.
Glad you could solve the issue. Cheers.
Will i be able to explore datastores on my vmx this way ?
Yes, you should be able to explore all the files of your VCSA.
Thanks Juan , it worked 🙂
Glad I could help. Cheers.
For VCSA 6.5 and 6.7 you have to use “shell /usr/libexec/sftp-server” in the WinSCP SFTP Server field, not the one shown above. Login as the VCSA root user, this removes the requirement to enable the shell. Hope this helps.
Thanks Juan, 2nd method worked on one of my 6.7 VCSA but using JV's SFTP server, that worked on another VCSA without making the 2nd change.