This command allows to connect to an SSH alias and stay connected. The core functionality only allows to execute single commands via SSH.
Since the package index of WP-CLI is currently on hold, the package has to be installed by hand:
$ cd ~/.wp-cli/packages/
$ composer require dword-design/wp-cli-ssh-command
Configure your SSH aliases in wp-cli.yml
:
@live:
ssh: user@myserver.de
path: www
@alias2:
...
Connect to the server via the SSH command:
wp ssh @live
- Directly navigate into the SSH aliase's
path