Using command lines in Magento 2, you have to connect to Magento 2 Server using Terminal or SSH first. In this post, we will guide you quickly to connect to Magento 2 Server for Windows, Mac OS and Linux (Debian, Ubuntu, Centos …).
In Windows, there are few ways to connect to Magento server such as Putty, WinSCP or Git Preview. Today, I use Putty to connect to Magento server. Open Putty and type Server IP or host and Port (default: 22).
Then type Username and Password, after succesfully loggin, you can access to your server.
Change direct to Magento root folder:
In this case, our Magento 2 source code placed in
/var/www/magento2, this may be difference from your server.
By Default, Mac OS and Linux has Terminal tool, you can use this to access to remote Magento server.
ssh [email protected] -pPORT
user: Server Username
host: Server IP or Host
-pPORT(Optional): SSH Server Port. E.g Port 22 so it is