SSH to remote server [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
this could be a very easy question, I have read some articles but I cannot fit those articles to my situation:
I have from remote.com server a pair of private and public keys (.ppk) for user 'dummy'.
I am in some Unix server (AIX 7.1) and I want to do:
ssh dummy#remote.server with prompt the login
We don't know the password they just provided the keys to log in into the server.
What we have to do?
Just in case: We don't have puttygen and We are not allowed to install it, do we have to ask for PEM format keys?

Making some assumptions:
That the people who have given you the public/private key pair have set up the remote server "dummy" account appropriately
The version of SSH on your local UNIX server is OpenSSH (or something similar)
You need to save the private key you have been given somewhere safe on the filesystem, but this needs to be in the format the local SSH client understands - and for this you will need to run it through 'puttygen'. Does not have to be on the local server, just somewhere to get the right format of key.
ssh -i <identity-file> dummy#<servername>
should do the trick.

Related

Why can I do ssh to my server using any private key? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 11 months ago.
Improve this question
I have Public key authentication enabled for connection to my server, after connecting to my server using my correct private key I can authenticate to my server using any private key file and it works.
I use -i option for specifying the private key:
ssh -i /anything meliwex#server_ip
Even if the file doesn't exist I can still connect to my server.
Is it possible that ssh caches the private key? If yes how can I remove that cache?
You could add -v to see which keys are really used.
The -i option isn't exclusive, ssh is still able to use keys from a ssh-agent and also the default keys from .ssh/id_*
Probably your key in .ssh/id_rsa isn't protected with a passphrase.
Therefore ssh will use it silently and you can login.

Permission to access another remote server Linux, Ubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
How can I allow a remote server to run a command without asking for password and any confirmation.
I use this command but it asks for password,
ssh root#0.0.0.0 /var/workingproject/notify
is there a way I can whitelist a remote server to access my server and execute a command without asking for password?
You can add your public key, generally found on your local box at ~/.ssh/id_rsa.pub to your remote server's authorized keys file. To do it automatically, you could use something like this:
ssh-copy-id -i ~/.ssh/id_rsa.pub root#0.0.0.0
Or alternatively, you can open the remote authorized keys file (~/.ssh/authorized_keys) and add your public key directly.
If you do not have a public key configured on your local instance, you can run:
ssh-keygen
to create one.

How to ssh another VM without password [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Now, I have two SuSe11SP3 VM. I want to ssh another VM without password. Because I often use scp to copy files between the two VMs. But the password is too long, I don't want to change password. I know maybe I can use publickey, my question is how can I achieve by using script.
As General said, you could use ssh-keygen to create a pair of keys without password and copy .pub key to another VM's ~/.ssh/authorized_keys

How to ssh multiple hops without putting the local RSA key everywhere [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a weird setup where I work from my mac, server A and server B. I can login to A directly without having password by adding my RSA keys, and login to B from A directly without using password too.
I sometimes wanted to login directly into server B from my mac, because B is where the production environment is running. I can use ssh with ProxyCommand, but then I have to add my keys into server B, is there any way I can avoid doing this? Because B is an auto managed server, the key is refreshed all the times.
Theoretically, since I can get from my mac to A (without password), and then from A to B (without password), I should be able to get into B directly. But I can't find the proper way of doing this without adding my key on mac into B's authorized_keys. Or is there a way I can automatically add my key during this login chain, because when I try to do that, ssh reports something about man-in-the-middle attack and rejects it.
Using ProxyCommand you don't need to put your key anywhere. All the authentications are initiated from your host, if you use the -W option like this:
ProxyCommand ssh -W %h:%p proxy

Passwordless SSH best practice [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I've found lots of articles describing how to do passwordless ssh and I have got it up and running no problems.
What I can't find is information on how to best set this up for multiple machines?
If we have 100 servers that would all need to log into each other then I need to setup access to 99 other machines from all 100 machines. That 9,900 times I need to run the various commands. I could automate this but it still seams excessive to me.
Is there a simple way for example where all machines have the same public/private keys and then it just works?
Ideally I would like to simply copy files onto each server and have it work.
Yes it is possible.
1. Create a public and private key combination
2. Rename the file so that it does not interfere with the default keys on the machine
3. Copy these two files to all the host machines which you want to connect
4. use "$ ssh -i <path to the new public key> user_name#host_ip" command to login

Resources