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 9232639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:21:42+00:00 2026-06-18T06:21:42+00:00

I am writing a script which needs to be able to access a server

  • 0

I am writing a script which needs to be able to access a server with limited access. I wish to do this by going through another unix server which I do have access to and also has access to the other computer.

I can SSH into the second machine from home an not be prompted for a password, since I generated an SSH key and using ssh-copy-id. When I am physically at the second machine, I can SSH into the third in the same manner, with out being prompted for a password.

However, when I SSH into the second and then try to SSH into the third, I am prompted to the pass-pharse for the key and the password for the third computer.

Why does this happen, and how can I stop this prompt?

EDIT: To clarity some points.

  • I do not have root permission on either machine I am SSHing into, only my machine at home
  • I missed typed above (now fixed). While physically at the second machine I can SSH into the third server.

Diagram

Machine A : Home machine, root access
|           SSH (passwordless)
v
Machine B : Publicly accessible server, no root permissions
|           SSH (passwordless while physically logged in,
|           password prompted while at machine A SSHed into machine B)
v
Machine C : Only accessable on campus 
            (which B is and A is not), no root permissions
  • 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-18T06:21:43+00:00Added an answer on June 18, 2026 at 6:21 am

    You mention being able to get into the 2nd machine from the 1st, and the 1st to the 2nd. So if there is a 3rd machine in the chain you need to setup SSH keys on the 3rd machine or get the public key off of the 3rd machine you mention.

    Another good tip is to manually run SSH with the verbose/debugging (-v) option so you can see exactly what is happening at each step.

     -v      Verbose mode.  Causes ssh to print debugging messages about its
             progress.  This is helpful in debugging connection, authentica-
             tion, and configuration problems.  Multiple -v options increase
             the verbosity.  The maximum is 3.
    

    This has saved me a lot of headaches in the past by showing me exactly how the login process is flowing & what exactly is clogging it up.

    So if somehow your 3rd machine is named machine3.local then your ssh command using verbose mode would be:

    ssh -v machine3.local
    

    EDIT: Original poster says that he is being asked for a passphrase for a key he generated for the 3rd machine. If that’s the case, that’s the problem. You can’t have a passphrase on an SSH key if you want passwordless access.

    ANOTHER EDIT: Also, be sure they have permissions that match the following & are owned by the account trying to access like this example shows:

    -rw------- [username] [usergroup] authorized_keys
    -rw------- [username] [usergroup] id_rsa
    -rw-r--r-- [username] [usergroup] id_rsa.pub
    -rw-r--r-- [username] [usergroup] known_hosts
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a script on which the user needs to be able to
I am writing a shell script in which I have to find the last
Folks, I have a problem. I am a writing a script in python which
I'm still fairly new to writing SQL scripts. I have a script which imports
i am writing a bash script which acts as a wrapper around another command.
I am writing an upgrade script which would take Tomcat's server.xml and add an
I'm currently writing a script, which at some point needs to compare numbers provided
I am currently writing a script which parses the ServiceTage, Computername and Username from
I am writing a script which counts all files and folders recursively. I tried
I'm writing a script which is to be executed hourly. It basically works as:

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.