Have you ever tried to upload / download files using WinSCP to / from the VCSA >= v. 6.0? Out of the box, this won’t work. In this post I’ll show you how to fix this.
Everytime you connect to the VCSA using WinSCP, it will time out with an error around the lines shown in Fig. 1. by default.
This happens because the VCSA comes with it’s own, locked down shell. You probably already noticed that if you open the DCUI of the VCSA or connect to it using SSH, you’ll first have to enable the “shell” to get access to it. You can do so by running the following commands.
shell.set --enabled true shell
This will enable the “shell” and start it. What really happens is that VMware is using it’s own shell, the “appliancesh”. That’s what you see what you login to a freshly installed VCSA. But what we want is the bash shell. While this makes alot of sence in theory - the VCSA should be a working “blackbox” that you throw away and redeploy if it ever stops working - in reality you still will find youself in situations where you have to access the linux OS of the appliance itself.
So while you as a user knows what to do to get to the shell - run the commands above - WinSCP expects a shell it can handle for it’s operations, such as the bash, and doesn’t know what to do to get there. So what can you do? Switch the default VCSA shell to bash!
KB2100508 explains how to do it. Basically, once you accessed the shell using the commands above, you run the command:
chsh -s /bin/bash root
This will set bash as the default shell for the user root and WinSCP will run just fine on that, if you connect using that user. Once you’re done you can switch the shell back to the appliance shell using:
chsh -s /bin/appliancesh root
P.S.: for those of you unaware: VMware switched the underlaying OS in the VCSA from SLES to it’s own, custom built Photon OS (Linux). Thus, if you run into any issues with the SLES command you used in the past: there’s a big chance those commands are gone now and you’ll have to look for the propper Photon OS commands. The good about this huge change is that VMware now owns the compleate software stack of the vCenter Appliance. One of the first things you’ll notice in VCSA 6.5 is the awesome boot time compated to VCSA 6.0, thanks to Photon OS. Sadly vCenter the services still need some time to start but I’d argue that the overall ready-to-rock time seems to be faster.