Get Adobe Flash player

Enable ESX remote ssh root access

If you are getting an error trying to remotely connect to an ESX host via ssh it is because root ssh access is disabled by default. Therefore winscp, putty, or any other remote console tool will fail.

These steps are taken from the VMware Partner Plan and Design toolkit document tilted “VI Assembly and Configuration Guide” written by Pang Chen. Here are the steps necessary to enable root to have ssh remote access.

Step 1a – Enable remote ssh root access

Modify the PermitRootLogin flag to yes in the /etc/sshd/sshd_config file to allow root remote login.

# perl -spi -e ‘s|PermitRootLogin no|PermitRootLogin yes|’ /etc/ssh/sshd_config

Step 1b – Enable remote ssh root accessConfirm change.The value should illustrate yes, with no hash mark prior to the flag.

# grep ‘PermitRootLogin’ /etc/ssh/sshd_config

PermitRootLogin yes

#

Step 1c – Enable remote ssh root access

Restart the sshd service:

# service sshd restart


Related Posts

  • Pingback: Use the VI Client Datastore Browser to Upload Files to ESX Hosts | VM /ETC

  • http://www.kreslavsky.com/2008/11/vmware-esx-post-install-tips-part-1.html SSH

    You can use scripts

    For SSH
    f ! ( grep “PermitRootLogin yes” /etc/ssh/sshd_config > /dev/null 2>&1 ); then
    sed -e ’s,PermitRootLogin no,PermitRootLogin yes,g’
    /etc/ssh/sshd_config > /tmp/sshd_config && sync
    cp -f /tmp/sshd_config /etc/ssh/sshd_config
    echo “-I- SSH Root Login enabled”
    else
    echo “-I- SSH Root Login already enabled”

    For Firewall issue

    esxcfg-firewall -e nfsClient

    chkconfig firewall off > /dev/null 2>&1
    chkconfig iptables off > /dev/null 2>&1
    chkconfig –level 3 portmap on > /dev/null 2>&1
    chkconfig –level 3 netfs on > /dev/null 2>&1
    chkconfig –level 3 vmware on > /dev/null 2>&1
    chkconfig –level 3 vmware-late on > /dev/null 2>&1
    chkconfig –level 3 mgmt-vmware on > /dev/null 2>&1

    Taken from http://www.kreslavsky.com

  • http://www.kreslavsky.com/2008/11/vmware-esx-post-install-tips-part-1.html SSH

    You can use scripts

    For SSH
    f ! ( grep “PermitRootLogin yes” /etc/ssh/sshd_config > /dev/null 2>&1 ); then
    sed -e ’s,PermitRootLogin no,PermitRootLogin yes,g’ \
    /etc/ssh/sshd_config > /tmp/sshd_config && sync
    \cp -f /tmp/sshd_config /etc/ssh/sshd_config
    echo “-I- SSH Root Login enabled”
    else
    echo “-I- SSH Root Login already enabled”

    For Firewall issue

    esxcfg-firewall -e nfsClient

    chkconfig firewall off > /dev/null 2>&1
    chkconfig iptables off > /dev/null 2>&1
    chkconfig –level 3 portmap on > /dev/null 2>&1
    chkconfig –level 3 netfs on > /dev/null 2>&1
    chkconfig –level 3 vmware on > /dev/null 2>&1
    chkconfig –level 3 vmware-late on > /dev/null 2>&1
    chkconfig –level 3 mgmt-vmware on > /dev/null 2>&1

    Taken from http://www.kreslavsky.com

  • Pingback: Enable ESX remote ssh root access « My Blog

Badges

follow-me-twitter

I blog with Blogsy

Comments / DISQUS