Solved

questions regarding ssh

Posted on 2011-03-24
6
360 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 12

Assisted Solution

by:upanwar
upanwar earned 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
thank you all
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 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

12 Experts available now in Live!

Get 1:1 Help Now