The default shell of the vCSA is the Appliance Shell (/bin/appliancesh), which doesn’t work with WinSCP.
There are two solutions to work around this issue:
- Change the default shell of the root account to the Bash shell (/bin/bash)
- Configure WinSCP to use the SFTP protocol (yes, SFTP; not SCP) with the shell setting “shell /usr/lib64/ssh/sftp-server”
PS. Both of these solutions require enabling SSH login and Bash shell on the appliance.
- For the solution #1, here are the commands (see VMware KB2107727 for the full instruction).
- SSH to vCSA
- shell.set --enable True
- shell
- chsh -s /bin/bash root
- change back: chsh -s /bin/appliancesh root
- For the solution #2 (credit to http://www.v-front.de/2015/03/vcsa-60-tricks-shell-access-password.html), the previous site does not provide the details on configuring WinSCP. I had an issue when setting up the first time, and someone also commented the shell trick does not work anymore. So I document the step-by-step instruction below.
- Personally, I prefer the solution #2. Since I don’t need to mess-up the default shell of the root account.
The following instruction tested on vCSA 6.0 update 2 (6.0.0.20000) with WinSCP version 5.9 (build 6786).
- Login vCSA web console (https://<vcsa-server>:5480)
- Under Access, click Edit, select the checkboxes for “Enable ssh login” and “Enable bash shell”
- Change the Timeout value if necessary
- Create a new site in WinSCP
- Select “SFTP” under File protocol, type the vCSA host name, root and its password.
- Click the Advanced dropdown to edit the Advanced Site Settings
- Under Environment, SFTP, SFTP server, enter “shell /usr/lib64/ssh/sftp-server” (without quotes)
- Click OK and Save the setting, and click Login
Great blog! The step-by-step guide on connecting to vCSA using WinSCP is incredibly helpful. Your clear instructions and useful tips make the process easy to follow, even for beginners. Thanks for sharing such valuable information!
ReplyDeleteGreat guide on connecting to vCSA using WinSCP! The instructions are clear and easy to follow. It provides valuable insights for users looking to manage files and configurations. The step-by-step approach makes it simple for both beginners and experienced users to set up their environment effortlessly. filters direct
ReplyDelete