Forem

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

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

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

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay