But still i have few doubts:
Is ssh -i option used after the public key is setup at the remote server or can it be used with out the public private key setup?
If say suppose i have 500 servers and i need to get some data from that servers so do i need to setup public key in all servers or i can use ssh -i option.
How do i setup scp with out password authentication?
Tells you to chmod the .ssh folder to 755, I'm fairly sure it has to be chmodded to 700 or else SSH will not work because the .ssh directory is world readable with a chmod of 755?
The "ssh -F /user/.ssh/ssh_config" means that the ssh command should use the ssh client configuration from the file specified rather then the default file in /etc/ssh or /usr/local/etc usually.
The ConnectTimeOut=5 is self explanatory (SSH will only wait for 5 (seconds?) before giving up trying to connect)
The $host will be a variable you set to specify which host to connect to, hostname will cause an error I think and is not required.
The best way to be able to SSH to 500 hosts without passwords is to have a common NFS mounted home directory with a .ssh folder under it with a authorized_keys file in it.
Once you get passwordless SSH to work passwordless SCP will also work.
Last edited by TonyFullerMalv; 04-12-2009 at 12:19 PM..
Tells you to chmod the .ssh folder to 755, I'm fairly sure it has to be chmodded to 700 or else SSH will not work because the .ssh directory is world readable with a chmod of 755?
The "ssh -F /user/.ssh/ssh_config" means that the ssh command should use the ssh client configuration from the file specified rather then the default file in /etc/ssh or /usr/local/etc usually.
The ConnectTimeOut=5 is self explanatory (SSH will only wait for 5 (seconds?) before giving up trying to connect)
The $host will be a variable you set to specify which host to connect to, hostname will cause an error I think and is not required.
The best way to be able to SSH to 500 hosts without passwords is to have a common NFS mounted home directory with a .ssh folder under it with a authorized_keys file in it.
Once you get passwordless SSH to work passwordless SCP will also work.
Thanks TonyFullerMalv for the post.
I read documentation on internet.But none seems to give complete info.
Now i dont know what is this config file, while no tutorial on net discussed about config file.They just discussed about private and public keys
I would appreciate if any one can give a link to complete SSH setup with each and every file needed in the process.Or please point out some book
as i need to automate process to connect to 500 servers and pull some data.
Tells you to chmod the .ssh folder to 755, I'm fairly sure it has to be chmodded to 700 or else SSH will not work because the .ssh directory is world readable with a chmod of 755?
Tha manual confirms this:
Quote:
$ man ssh
.
.
.
~/.ssh/identity
~/.ssh/id_dsa
~/.ssh/id_rsa
Contains the private key for authentication. These files con‐
tain sensitive data and should be readable by the user but not
accessible by others (read/write/execute). ssh will simply
ignore a private key file if it is accessible by others. It is
possible to specify a passphrase when generating the key which
will be used to encrypt the sensitive part of this file using
3DES.
.
.
.
Quote:
Originally Posted by zenith
Thanks TonyFullerMalv for the post.
I read documentation on internet.But none seems to give complete info.
Now i dont know what is this config file, while no tutorial on net discussed about config file.They just discussed about private and public keys
I would appreciate if any one can give a link to complete SSH setup with each and every file needed in the process.Or please point out some book
as i need to automate process to connect to 500 servers and pull some data.
Thanks
Just google for 'ssh_config', you'll find many links to explanations on what the file contains.
For your needs, though, you wouldn't need to edit ssh_config. Most default ssh_config files would work for you so long as you have your keys and permissions set correctly.
The instructions in this mini tutorial should work fine for you if you follow the instructions carefully: SSH Without a Password
If you have problems, you could use the verbose switch (-v) in order to see a verbose output and perhaps paste the errors in this thread.
eg:
You can use one verbose switch (-v) but using 3 v's will make your output very verbose.
Hi,
I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step:
#!/bin/bash
# LAN SSH KEYS DISCOVERY SCRIPT
</etc/passwd \
grep /bin/bash |
cut -d: -f6 |
sudo xargs -i -- sh -c '
&& cat... (11 Replies)
Hi,
I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not...
I have .sh script like below and i have servers.txt contains all the list of servers
#/bin/bash
for host in $(cat... (3 Replies)
I'm trying to setup a link between my home pc (work-machine) and a server at work (tar-machine) that is behind a gateway (hop-machine) and not directly accessible.
my actions:
work-machine$ ssh -L 1234:tar-machine:22 hop-machine
work-machine$ ssh -p 1234 user@127.0.0.1
- shh access on... (1 Reply)
I have write a script which contains
ssh -p 12345 dcplatform@10.125.42.50
ssh 127.0.0.1 -p 5555 "$CMD"
ssh root@$GUEST_IP "$CMD"
before I use public key, it works well, now I want to change to "expect", BUT I don't want to change above code and "parameter position"
I can post a... (1 Reply)
Hi,
I want to use ssh to add a register key on remote ssh server. Since there are space characters in my register key string, it always failed. If there is no space characters in the string, it worked fine. The following is what I have tried. It seems that "ssh" command doesn't care about double... (9 Replies)
I am using Net::SSH::Expect to connect to the device(iLO) with SSH. After the $ssh->login() I'm able to view the prompt, but not able to send any coommands.
With the putty I can connect to the device and execute the commands without any issues.
Here is the sample script
my $ssh =... (0 Replies)