Skip to content

PlusMagi's Blog By Pitt Phunsanit

Plus emotional magic to the knowledge of logic.

  • About’s Pitt
Close Button
PlusMagi's Blog By Pitt Phunsanit Authentication,automation,Backend,CI/CD,Linux,Network Linux: GitHub

Linux: GitHub

2005-01-162005-01-16| phunsanitphunsanit| 0 Comment | 10:00
Categories:
  • Authentication
  • automation
  • Backend
  • CI/CD
  • Linux
  • Network

วิธี login github ใน linux ที่ตอนหลังไม่สามารถล๊อกอินโดยใช้ยูสเซอร์เนมและพาสเวิร์ดได้แล้ว

  1. ดูว่ามี key pair รียัง
    cd ~/.ssh
    ls
    1. ถ้ายังไม่มีไฟล์ id_rsa.pub ให้สร้างใหม่โดยคำสั่ง
      ssh-keygen -o -t rsa -C "[email protected] หรือ commant"
    2. Generating public/private ed25519 key pair.
      Enter file in which to save the key (/Users/phunsanit/.ssh/id_ed25519) :
      ถ้าตอบจะเป็นการใส่ชื่อไฟล์ ใน ~/.ssh เช่น phunsanit@GitHub ถ้า enter เฉย ๆ จะใช้ชื่อที่สุ่มมา
    3. ใส่รหัสผ่านใหม่ให้กับคำถาม
      Enter passphrase (empty for no passphrase) :
      Enter same passphrase again:
      อย่าลืมเก็บ password นี้ไว้ดี ๆ
    4. จะเห็นข้อความประมาณ
      Your identification has been saved in /Users/username/.ssh/id_rsa.
      Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
      The key fingerprint is:
      01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db [email protected]
      The key's randomart image is:
      +--[ RSA 2048]----+
      | |
      | |
      | . E + |
      | . o = . |
      | . S = o |
      | o.O . o |
      | o .+ . |
      | . o+.. |
      | .+=o |
      +-----------------+
      
  2. ดู public key ในไฟล์ .pub
    cat ~/.ssh/[email protected]
    จะเห็นข้อความประมาณ
    ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA879BJGYlPTLIuc9/R5MYiN4yc/YiCLcdBpSdzgK9Dt0Bkfe3rSz5cPm4wmehdE7GkVFXrBJ2YHqPLuM1yx1AUxIebpwlIl9f/aUHOts9eVnVh4NztPy0iSU/Sv0b2ODQQvcy2vYcujlorscl8JjAgfWsO3W4iGEe6QwBpVomcME8IU35v5VbylM9ORQa6wvZMVrPECBvwItTY8cPWH3MGZiK/74eHbSLKA4PY3gM4GHI450Nie16yggEg2aTQfWA1rry9JYWEoHS9pJ1dnLqZU3k/8OWgqJrilwSoC5rGjgp93iu0H8T6+mEHGRQe84Nk1y5lESSWIbn6P636Bl3uQ== [email protected]
    
  3. ใส่ public key ใน GitHub ไปที่ https://github.com/settings/ssh/new ใส่ Title ที่ต้องการเช่น home notebook และวางเนื้อหาใน clipboard ไปที่ช่อง Key คลิก Add SSH key

  4. ทดสอบโดยคำสั่ง
    ssh -T [email protected]
    จะตอบมาประมาณ
    Hi phunsanit! You’ve successfully authenticated, but GitHub does not provide shell access.
  5. ทดสอบโดยพิมพ์ clone ใน terminal แล้วไปที่ github repository ของเราคลิก clone คลิก SSH คลิกปุ่ม copy วางข้อความประมาณ [email protected]:phunsanit/xxx.git เช่น clone [email protected]:phunsanit/xxx.git
    ทำตามขั้นตอนไปการ clone ไปเรื่อย ๆ เมื่อมีคำถามเกี่ยวกับรหัสผ่านก็ใส่รหัสผ่านที่ได้ตั้งไว้

อ่านเพิ่มเติม

  • Generating a new SSH key and adding it to the ssh-agent
  • SSH Keys for GitHub
Tags: .web, backend, bashrc, env, Login, machine-learning, ssh, Terminal, ปัญญาประดิษฐ์

แนะแนวเรื่อง

PREVIOUS Previous post: Mindset & Mental Well-being (การพัฒนาสุขภาวะทางจิตใจและมุมมองชีวิต)
NEXT Next post: Misconceptions & Clarifications (ข้อเข้าใจผิดที่มักเกิดขึ้นและข้อคัดง้าง)

Projects

  • Statement Columns Mapping Helper
  • PlusMagi Blocks
  • PlusMagi Site Search
  • PlusMagi Tags Reindex
  • jQuery Plus Repeater

Recent Posts

  • มือถือไม่เปิดเครื่องเอง เมื่อถึงเวลาปลุก
  • A-10 Thunderbolt II: ตำนานหมูป่าหุ้มเกราะ ผู้ครองน่านฟ้าสนับสนุนภาคพื้นดิน
  • เจาะลึก Lockheed Martin F-35 Lightning II: พลิกโฉมสงครามทางอากาศยุคที่ 5 และการประชันสมรรถนะของ 3 รุ่นย่อย
  • สถิติไร้พ่ายบนขอบอวกาศ: เจาะลึกตำนาน Lockheed SR-71 Blackbird
  • ย้อนรอย Lockheed Martin F-22 Raptor: ราชาแห่งการครองอากาศยุคที่ 5 ที่ไม่มีวันส่งออก

Archives

Categories

  • applied mathematics (302)
    • agriculture (20)
    • Astronomy (27)
    • Botany (93)
    • chemistry (42)
    • Cosmology (4)
    • Environmental Science (22)
    • physics (3)
    • statistics (2)
  • business (2,129)
    • Accounting (136)
    • Business Analysis (912)
    • collaboration (120)
    • Corporate Governance (4)
    • Finance (107)
    • Governance (10)
    • Marketing (67)
    • Operations Management (2)
    • Real Estate (31)
    • risk management (2)
  • computer science (3,067)
    • AI (494)
    • Biology (211)
      • Environment (54)
    • Cloud Computing (1,265)
    • Computer Engineering (29)
    • Data Transformation (208)
    • Data Visualization (66)
    • information retrieval (2)
    • Information Science (37)
    • Information Technology (88)
    • library science (3)
    • Mathematics (47)
    • technology (9)
    • เทคโนโลยี (194)
  • Design (337)
    • UX/UI (53)
  • engineering (1,293)
    • architecture (1,045)
    • Automotive (59)
    • Bioengineering (34)
    • Building Engineering (135)
    • Civil Engineering (94)
    • Electrical Engineering (10)
    • Mechanical Engineering (3)
    • Safety Engineering (3)
    • transportation (3)
    • urban planning (9)
  • Humanities (1,130)
    • Academia (709)
    • Archaeology (28)
    • art (160)
    • Communication (158)
    • Culture (183)
    • Education (4)
    • history (115)
    • Linguistics (20)
    • Literature (101)
    • media studies (3)
    • military history (3)
    • Religion (4)
    • social science (4)
    • Sociology (2)
    • Spirituality (2)
  • Law (314)
  • Life (2,163)
    • Accessibility (32)
    • Cartoon (146)
    • D.I.Y (78)
    • Health (203)
      • Safety (127)
    • Mindset (311)
    • Movies (200)
    • Philosophy (246)
    • Psychology (1,377)
      • Behavioral Science (1,249)
      • Cognitive Science (501)
    • Sci-Fi (93)
    • Tips and Tricks (60)
    • พุทธ (7)
  • management (875)
    • knowledge management (278)
      • Documentation (81)
    • productivity (5)
    • Project Management (16)
    • strategy (4)
  • Network (437)
    • IOT (27)
    • Nginx (27)
  • Operating Systems (613)
    • Linux (206)
    • macOS (151)
      • Homebrew (25)
    • Shell Script (45)
      • Oh My ZSH (5)
    • Windows (98)
      • PowerShell (25)
  • Programming (2,853)
    • .NET (199)
      • .NET Core EF (12)
      • C# (147)
    • API (838)
      • REST (8)
    • Database (705)
      • MariaDB (34)
      • MySql (66)
      • Oracle Database (24)
      • PostgreSQL (21)
      • RDBMS (55)
      • SQL Server (76)
        • T-SQL (26)
    • Programming Language (7)
    • Programming Languages (391)
      • Java (96)
      • PHP (238)
      • Python (13)
      • Rust (31)
    • Software Architecture (9)
    • Software Engineering (84)
    • System Analyst (SA) (66)
    • system architecture (5)
    • system design (7)
    • System Modeling (3)
    • Systems Programming (2)
    • Testing (140)
      • Automated Testing (127)
    • Web (2,566)
      • Apache HTTP Server (58)
      • Backend (2,363)
        • Laravel (54)
        • Spring Boot (15)
      • Frontend (382)
        • Angular (16)
        • CSS (67)
        • JavaScript (194)
        • jQuery (57)
        • Tabulator (24)
        • Tailwind CSS (4)
        • Vue.js (6)
      • WordPress (40)
  • SecDevOps (1,106)
    • automation (496)
    • CI/CD (349)
    • Docker (119)
    • GIT (56)
    • Hardware (84)
    • SVN (6)
    • system (248)
      • System Administration (37)
  • Security (629)
    • Authentication (248)
    • Cryptography (43)
    • Cybersecurity (349)
  • Uncategorized (1)

Sirat WordPress Theme By VWThemes

Scroll Up
Go to mobile version