Solved

questions regarding ssh

Posted on 2011-03-24
6
393 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
awk variable in printf 1 43
Linux mount of Windows Shared Now Fails 8 116
PHP website on Linux - server DNS address could not be found. 18 87
exchange, squid, proxy, linux 6 43
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.:
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.

733 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