Cookies setting

Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy

Cookie Policy
Essential cookies

These cookies are strictly necessary for the site to work and may not be disabled.

Information
Always enabled
Advertising cookies

Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.

Information
Analytics cookies

Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.

Information
mageplaza.com

How to Connect to Magento 2 using Terminal SSH

Vinh Jacker | 12-18-2024

How to Connect to Magento 2 using Terminal SSH

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 …).

Connect to Magento 2 Server in Windows

In Windows, there are few ways to connect to the Magento server such as Putty, WinSCP or Git Preview. Today, I use Putty to connect to the Magento server. Open Putty and type Server IP or host and Port (default: 22).

conenct magento 2 server using Putty

Then type Username and Password, after succesfully loggin, you can access to your server.

magento 2 server

Change direct to Magento root folder:

cd /var/www/magento2

In this case, our Magento 2 source code placed in /var/www/magento2, this may be difference from your server.


Magento 2 extensions

Magento 2 extensions

Allow you to achieve more with your online store

Check it out!


Connect to Magento 2 Server in Mac OS, Linux (Debian, Ubuntu, Centos)

By Default, Mac OS and Linux has Terminal tool, you can use this to access to remote Magento server.

  • Open Termnial

terminal

  • Syntax to connect to your Magento server
ssh user@host -pPORT
  • user: Server Username
  • host: Server IP or Host
  • -pPORT (Optional): SSH Server Port. E.g Port 22 so it is -p22

E.g:

ssh sam@192.168.1.100

That’s all!

I hope this tutorial will be helpful for you. If you have any questions, feel free to leave comments below.

x
    Jacker

    With over a decade of experience crafting innovative tech solutions for ecommerce businesses built on Magento, Jacker is the mastermind behind our secure and well-functioned extensions. With his expertise in building user-friendly interfaces and robust back-end systems, Mageplaza was able to deliver exceptional Magento solutions and services for over 122K+ customers around the world.



    Related Post

    Website Support
    & Maintenance Services

    Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

    Get Started
    mageplaza services