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
Related
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
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.
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 need to copy a configuration file from one linux account to another account. Since I do not have the permission I couldn't scp. So, how to yang and put the entire file across the accounts? File has 100s of lines so, it is not possible to copy, paste by mouse. I'm using putty.
If you can use PuTTY then you can use scp - both use the SSH protocol and require a user login.
Since you are comfortable using PuTTY, try using PSCP, which implements the scp linux command with a GUI. Use the same credentials as you do for PuTTY.
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 9 years ago.
Improve this question
I'm able to SSH into my network using my DDNS, which takes me into my NAS. However, I also have my Windows PC and my Linux PC on that network. I want to SSH into them from outside of the network, however my IP/DDNS takes me to the NAS, how can I specify which machine to SSH into, without being on a VPN.
I use
ssh -i /path/to/rsa/key user#ddns.com
or
ssh -i /path/to/rsa/key user#ip
I want to be able to differentiate between which machine I'm SSHing into, as their addresses are 192.168.1.103, 192.168.1.110, and 192.168.1.135 which is the NAS.
Any input would be much appreciated.
You may want to use tunneling, if you can connect to NAS via SSH.
Take a look at this article
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
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.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I'm creating public/private keys to access to my VPS. I would like to understand how to organize better this kind of job.
At the moment I have a local user named dail and three users in the VPS woth their home like:
user1 -> /home/vhosts/user1
user2 -> /home/vhosts/user2
user3 -> /home/vhosts/user3
OK, now my goal is to connect from my PC to the VPS with public/private keys avoiding password logins.
I have generated three pairs of keys in my PC and then uploaded the public keys in the three home of the VPS users.
I have the private keys in /home/dail/.ssh/ named like: user1.private user2.private user3.private and the publis are in:
/home/vhosts/user1/.ssh/authorized_keys (user1.pub)
/home/vhosts/user2/.ssh/authorized_keys (user2.pub)
/home/vhosts/user3/.ssh/authorized_keys (user3.pub)
I tested all the things and all works correctly but i woul dlike to understand if this is a good setup OR do i have to do the opposite?
I mean create the keys on the VPS and save the .pub keys in my pc... ?
Another thing is, in my local pc can I not create a directory with all the private keys avoiding to save them in the .ssh of the local user that has nothing to do with server users ?
Thank you!
Creating the keys on your local PC and upload the .pub Keyfile to your server's ~/.ssh/authorized_keys is the right way.