Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8197609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:46:37+00:00 2026-06-07T05:46:37+00:00

This has probably been asked somewhere but I can’t find it for the life

  • 0

This has probably been asked somewhere but I can’t find it for the life of me.

I am currently setting up a server machine, and I want to make it so that only computers which are directly SSH’ing into the server and has an authorized key can get in. I’ve already gotten the keys to work, but I don’t know how I should go about making sure that people can’t multi-hop their way into the server machine. I want to know:

  • Is it even possible to disable multi-hopping by only changing settings on the server machine?
  • If it is, how do I go about doing it?
  • If not, what other options do I have to achieve what I’m trying to do?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:46:38+00:00Added an answer on June 7, 2026 at 5:46 am

    I don’t believe it’s possible by only changing settings on the server.

    If your server is called server and another machine on your network is called aux, then you need to disallow the following multi-hop methods, probably others as well:

    1. ssh -t aux ssh server
    2. ssh -o ProxyCommand='ssh aux /usr/bin/nc %h %p' server
    3. ssh -N -L 2222:server:22 aux & ssh -p 2222 localhost

    So you need to ensure that

    • ssh when run on any other machine on your network will refuse to connect to server, except when the user is logged in locally (not via ssh)
      • alternatively, ensure the sshd setting AllowAgentForwarding is set to no on all other machines on your network
        • the manpage notes that this “does
          not improve security unless users are also denied shell access, as they can always install their own forwarders”
    • netcat and equivalents are not installed on any other machine on your network
    • the sshd setting AllowTcpForwarding is set to no on all other machines on your network
      • the manpage notes that this “does not improve
        security unless users are also denied shell access, as they can always install their own forwarders”

    This may be a bit much.

    Perhaps you can keep the private keys embedded on hardware tokens that may not leave the building? This is beyond the limits of my experience, though.

    You should get a better answer if you ask at ServerFault.com, and hopefully your question will be migrated there soon.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This has probably been asked before, but I can't find a good way of
I know this has probably been asked before, but I can't find it with
I know this has probably been asked before but I can't find a specific
This has probably been asked, but I can't find it... I want to link
This has probably been asked before but I can't find it anywhere. I have
I know this has probably been asked before but I can't seem to find
This probably has been asked before but all I can find are questions regarding
This has probably been asked before but I can't find any relevant post using
This has probably been asked before but I can't seem to find the answer.
This has probably been asked before on SO, but I was unable to find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.