Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
D
development_resource_index
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 68
    • Issues 68
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • yuan
  • development_resource_index
  • Issues
  • #58

Closed
Open
Created Jan 10, 2023 by joker@jokerReporter

SSH Jump Host

How to Access a Remote Server Using a SSH Jump Host

# Jump host

ssh -J user1@host1:{ssh_port_of_host1} user2@host2 -p {ssh_port_of_host2}

# Multiple Jumphosts List

ssh -J user1@host1:{ssh_port_of_host1}, user2@host2:{ssh_port_of_host2} user3@host3 -p {ssh_port_of_host3}

  • 若出現 "Unable to negotiate with UNKNOWN port 65535: no matching host key type found. Their offer: ssh-rsa" 的錯誤訊息,是因為 ssh 客戶端禁用了 ssh-rsa 演算法,但目標伺服器只支援 ssh-rsa,故需在本地 ssh config 添加以下語法:
Host *
        HostKeyAlgorithms +ssh-rsa
        PubkeyAcceptedKeyTypes +ssh-rsa

抑或是在指令中添加 flag "HostKeyAlgorithms" 及 "PubkeyAcceptedKeyTypes"

ssh -A -J user@host1:port user@host2 -p {target_host_port_for_ssh} -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa

以上方法參考該篇文章 https://blog.alanwei.com/blog/2022/01/24/ssh-no-matching-host-key-type-found

Edited Jan 10, 2023 by joker
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None