Solved

questions regarding ssh

Posted on 2011-03-24
6
369 Views
Last Modified: 2012-08-13
two questions regarding ssh.

I am  logged in to a jumpoff box.  Can i  "carry" my autentication to the next box  without putting in my password again ?

Every time I ssh it ask me "do you want keep your key this time or ."  I just want to default to sshing to the box without a this question.  We have a lot of systems and liikey will not be going from the jumpbox to the target that often.


0
Comment
Question by:TIMFOX123
6 Comments
 
LVL 31

Expert Comment

by:farzanj
ID: 35212120
Yes, you can do ssh without entering your password every time.

You can setup a public and private key mechanism and this way you will not have to enter your password every time.  Setting it up is fairly simple too
0
 
LVL 31

Accepted Solution

by:
farzanj earned 250 total points
ID: 35212135
When you enable your public/private keys on the host and the target, your source host is also entered into known hosts in the target machine.  You just have to say, "yes" for the first time when it asks you whether you want it save it.  Thereafter, you don't need to do anything.  You just say, "ssh hostname" and it would log you in with the current userID, provided the same userID exists on the target machine as well.
0
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 250 total points
ID: 35212148
Setup includes the following steps:

1.  Generation of asymmetrical keys --public/private pair.
2.  Keeping the private key on the jump host and copying the public on the target machine.
3.  The public key is copied to the following file : ~userID/.ssh/authorized_keys
4.  Making sure the keys or the key folder has the right permissions.
5.  Doing the first ssh and typing "yes"
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 12

Assisted Solution

by:upanwar
upanwar earned 125 total points
ID: 35212908
For the password less authentication FARZANI has suggested the correct way but If you want that while sshing any target system, the system should not ask "do you want keep your key this time or ."  . Then you can suppress that message with option -q

-q           Quiet mode.  Causes all warning and diagnostic messages to be suppressed.
0
 
LVL 6

Assisted Solution

by:mohansahu
mohansahu earned 125 total points
ID: 35213615
Hi,

ssh without prompting for password ,follow the below steps.

1.generate ssh key on source host
# ssh-keygen -t rsa
2.copy public ssh key to each destination host
#scp ~/.ssh/id-rsa.pub desthost:~
3.create an authorized key file on each destination host
#ssh desthost(entr pwd)
# cat id-rsa.pub >> .ssh/authorized-keys,if .ssh directory doesnt exist create it.
4.restart the sshd services

MS

0
 

Author Closing Comment

by:TIMFOX123
ID: 35214291
thank you all
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Solaris 4.1.3 cloning and booting 13 72
linux pull logs and export FTP 4 60
linux installs 6 49
Run same command on multiple files in Linux 3 0
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now