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
No comments:
Post a Comment