Forem

Long Nguyễn Xuân
Long Nguyễn Xuân

Posted on

ssh không cần mật khẩu bằng ssh-copy-id trong windows

Tiền điều kiện

Đã biết về ssh

Ngữ cảnh

cái này áp dụng khi bạn chán việc phải gõ đi gõ lại cái password khi cần ssh vào server, và vì cái câu trả lời trên chỗ serverfault (anh em với stackoverflow) nó có "issue" nên tự mình viết 1 bài

Giới thiệu

Để ssh vào server không cần mật khẩu, có thể dùng ssh-copy-id trong bộ Git Bash on Windows hoặc copy file

cách làm

tạo 1 cái ssh id bằng ssh-keygen, 1 cái ssh id là tổ hợp gồm 2 files: ~/.ssh/id_rsa & ~/.ssh/id_rsa.pub (nếu bạn không đặt tên khác)
mở Git Bash on Windows, run ssh-copy-id user@host (*)

(*) nếu server của bạn config để ssh chạy ở port khác thì thêm tham số port vào ssh-copy-id -p port user@host

nếu bạn Dùng Windows, và chỉ có putty / Winscp trên máy mà không có Git Bash on Windows (😱) thì có thể làm theo hướng dẫn ở link này

(*) bài được viết từ 2023 trên viblo, copy&paste qua đây để lưu trữ

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

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

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay