Solved

questions regarding ssh

Posted on 2011-03-24
6
385 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS - HAProxy- KeepAlived 5 51
AWS ELB 5 95
How yum repo uses sqlite3 to keep metadata about the repository? 2 46
number in printf 13 32
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

860 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