Unable to SCP into Platform Services Controller (PSC) or vCenter Server Appliance 6.0
SCP into PSC or VCSA
I just wanted to provide everyone with a quick problem and resolution I found when I was attempting to upload files via SCP to my PSC or VCSA. Every time I attempted to connect through SSH, or WinSCP I would receive the following error messages.
Unknown command: `scp' or Host is not communicating for more than 15 seconds. If the problem repeats, try turning off 'Optimize connection buffer size'.
This occurs because the login bash for root is /bin/appliancesh. To resolve this, you will need to change the login shell for root to /bin/bash using the change shell command below.
# chsh -s "/bin/bash" root
If you want to change the login shell back to default, you can substitute “/bin/bash” in the command above for “/bin/appliancesh”.
Hope this helps!
15 Comments
Thank you so much, struggled with this error for ages..
Now I can carry on replacing the certificates in vcenter 🙂
You are welcome, Andre!
Sean
This worked as instructed. Thanks for the help!!
You’re welcome, Al!
Perfect! Thank you!
Is there a way to enable the SSO user for scp similar to what you did for the localos user root?
Thanks,
Vicky
Hi Vicky,
No, I don’t believe so.
Thanks,
Sean
When I reverted back by running chsh -s “/bin/appliancesh” root, my root password no longer work. Any idea?
Hi Hao,
That’s weird, I have reverted back and forth a few times. There have been some known issues with the shell timeout where it thinks the password is incorrect. Can you attempt to restart the SSH session, or reboot the appliance?
Thanks,
Sean
Hi Sean,
So here’s the weird thing. The root login works fine in the VAMI interface after I upgrade to 6.0 U1, but a putty ssh session tell me the root password is invalid. I log into the VAMI interface with root and restart the ssh services, changed the root password, and even reboot the whole darn PSC server itself. None of those worked to allow me to ssh.
Hi Hao,
I have had that happen to me in a lab when I changed the hostname since the certificate no longer matched. Can you try to reboot and regenerate certificates? That should resolve the issue.
Thanks,
Sean
Thanks Sean..
It worked ..
Thanks a lot. the show stopper is gone now
Struggling!!!
Following the video at https://www.youtube.com/watch?time_continue=113&v=iQSo0kAYjvE get me an error of :
—————————
Error
—————————
Received too large (1399350636 B) SFTP packet. Max supported packet size is 1024000 B.
The error is typically caused by message printed from startup script (like .profile). The message may start with “Shel”.
—————————
Cannot initialize SFTP protocol. Is the host running an SFTP server?
—————————
OK Reconnect Help
—————————
So, changing the shell (# chsh -s “/bin/bash” root), then lead to another error:
—————————
Error
—————————
Connection has been unexpectedly closed. Server sent command exit status 127.
—————————
OK Reconnect Help
—————————
An idea?
OK, looks like vCenter 6.5 and WInSCP can simply use SCP rather than SFTP.