DEV Community

Cover image for quản lý server chuyên nghiệp bằng mRemoteNG và OpenSSH (thay vì putty)
Long Nguyễn Xuân
Long Nguyễn Xuân

Posted on

2

quản lý server chuyên nghiệp bằng mRemoteNG và OpenSSH (thay vì putty)

TLDR

Dành cho các bạn nào dùng Windows và cần quản lý nhiều linux servers

Tiền điều kiện

  • biết về linux server và SSH,
  • sử dụng Windows 🤣

Mình không rõ hội dùng Linux / Mac Client quản lý khoảng 50+ server thì họ dùng cái gì, nhưng chắc chắn là ngồi nhớ từng cái IP / hostname / username / password hoặc một đống file key thì khá là "bất ổn" 🤣
còn mình dùng Windows Client thế nên mình dùng mRemoteNG, một ứng dụng dạng FOSS, cho phép quản lý nhiều server một cách hiệu quả.

tuy nhiên, default thì mRemoteNG sử dụng putty để kết nối đến các linux server 😰 nên nhiều lúc gặp một tỉ vấn đề với cái putty client, điển hình nhất là việc config để sử dụng ssh bằng key file với putty nó rất là "đau bi" 😱

thế nên mình dùng 1 mẹo, học từ đây, để kết nối tới linux server, kết hợp Putty và OpenSSH (được tích hợp sẵn trong Windows 10+)

image.png

Cách làm

  1. thiết lập ssh-không-cần-password theo hướng dẫn ở đây nếu không làm bước này thì các bạn cần truyền thêm tham số file key như trong hướng dẫn gốc
  2. tạo 1 cái External tools trong mRemoteNG / Tools / External Tools với các thông tin như sau:
a) Display Name = openSSH
b) Filename = c:\program files\powershell\7\pwsh.exe
c) Arguments = -c "ssh %USERNAME%@%HOSTNAME%"
d) Working directory = $env:USERPROFILE
Enter fullscreen mode Exit fullscreen mode
  1. tạo 1 new record tới server của bạn trong phần Connections
  2. double click vào record đó và enjoy

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay