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!

 

Posted by:

Sean Whitney

15 Comments

  1. andre -  March 16, 2015 - 6:06 am 29

    Thank you so much, struggled with this error for ages..

    Now I can carry on replacing the certificates in vcenter 🙂

    Reply
    • Sean Whitney -  March 16, 2015 - 12:49 pm 32

      You are welcome, Andre!

      Sean

      Reply
  2. AI -  June 1, 2015 - 1:13 pm 124

    This worked as instructed. Thanks for the help!!

    Reply
    • Sean Whitney -  June 1, 2015 - 2:33 pm 127

      You’re welcome, Al!

      Reply
  3. Jay Duff -  June 17, 2015 - 3:25 pm 163

    Perfect! Thank you!

    Reply
  4. vk -  August 18, 2015 - 8:04 am 234

    Is there a way to enable the SSO user for scp similar to what you did for the localos user root?

    Thanks,
    Vicky

    Reply
    • Sean Whitney -  August 25, 2015 - 9:19 pm 236

      Hi Vicky,

      No, I don’t believe so.

      Thanks,
      Sean

      Reply
  5. Hao -  September 25, 2015 - 12:35 pm 262

    When I reverted back by running chsh -s “/bin/appliancesh” root, my root password no longer work. Any idea?

    Reply
    • Sean Whitney -  September 28, 2015 - 7:19 pm 268

      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

      Reply
      • Hao -  September 30, 2015 - 11:55 am 270

        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.

        Reply
        • Sean Whitney -  October 12, 2015 - 9:13 pm 276

          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

          Reply
  6. Ben -  February 22, 2016 - 7:23 am 421

    Thanks Sean..
    It worked ..

    Reply
  7. Naqi -  July 13, 2017 - 6:03 am 597

    Thanks a lot. the show stopper is gone now

    Reply
  8. Chris -  October 22, 2017 - 8:45 am 616

    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?

    Reply
  9. Chris -  October 22, 2017 - 8:55 am 617

    OK, looks like vCenter 6.5 and WInSCP can simply use SCP rather than SFTP.

    Reply

Leave A Comment

Your email address will not be published. Required fields are marked (required):

Back to Top