drush site-sshfor drush 8x


Connect to a Drupal site's server via SSH for an interactive session or to run a shell command

drush site-ssh

  • Aliases


    site-ssh has 1 alias/es:


    drush ssh

  • Arguments


    site-ssh accepts 1 argument/s:


    bash : Bash to execute on target. Optional, except when site-alias is a list.

  • Options


    site-ssh accepts 4 option/s:


    --cd : Directory to change to. Use a full path, TRUE for the site's Drupal root directory, or --no-cd for the ssh default (usually the remote user's home directory). Defaults to the Drupal root.

    --ssh-options : A string of extra options that will be passed to the ssh command (e.g. "-p 100")

    --tty : Create a tty (e.g. to run an interactive program).

    --escaped : Command string already escaped; do not add additional quoting.

  • Examples


    Open an interactive shell on @mysite's server.

    drush @mysite ssh

    Run "ls /tmp" on @prod site. If @prod is a site list, then ls will be executed on each site.

    drush @prod ssh ls /tmp

    Run "git pull" on the Drupal root directory on the @prod site.

    drush @prod ssh git pull

  • Comments


    comments powered by Disqus