LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-01-2021, 01:31 AM   #16
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by computersavvy View Post
If you are configured to use keys and not passwords, then the host you are sshing from must have the public key for the host you are sshing to (even if it is the same host). The host you are connecting to must have the private key that matches the public key used.

Yes it is quite possible to ssh in an almost infinite link from one host to another and on and on and on......
I have even, repeatedly, sshed to one host then back to the original host instead of logging out and back in later.
I need to get the term for ssh client machine term and ssh server machine clear ?
From your post above, "the host" is refering to ssh client or ssh server ? I don't get your answer clear.
Were you saying, you can sshing into an ssh server1, then sshing from the ssh server1 into ssh server2..... and keep sshing from ssh server(n-1) into ssh server(n)... into infinity ?
BUT, i was saying "i was sshing from ssh client computer1 into ssh server computer1" and on the same time "sshing from server computer1 back into ssh client computer1" , but "ssh server computer1" prompted:
Code:
currentUserName@hostIP: Permission denied (publickey).
. is it suppose to be so ?



I think you meant the ssh client machine mush have "public key " ? ?
Isn't public key is only for ssh server ?
The location for "private key" is suppose to be in "$HOME/.ssh/"
Quote:
the host you are sshing from must have the public key

I am now confused. You meant the ssh server must have private key ?
Isn't ssh server must have public key only ?
The location for "public key" is suppose to be in "$HOME/.ssh/".
Quote:
The host you are connecting to must have the private key that matches the public key used.

Last edited by andrewysk; 08-01-2021 at 01:38 AM.
 
Old 08-01-2021, 01:50 AM   #17
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,358
Blog Entries: 3

Rep: Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767
Quote:
Originally Posted by andrewysk View Post
I need to get the term for ssh client machine term and ssh server machine clear ?
From your post above, "the host" is refering to ssh client or ssh server ? I don't get your answer clear.
One important piece of background information is that there are two categoies of usage for the SSH key pairs involved here.

1) In your heading for this thread, and in the original post, you mention "The authenticity of host ... can't be established. ECDSA key fingerprint ..." That key pair is the one which the SSH server uses to identify itself to the SSH client. Those key pairs are kept on the system running the SSH server in the /etc/ssh/ directory. Those keys are one per SSH server¹. The idea is that the first time you connect you compare the fingerprint of the public key being offered with the fingerprint for the key known to be on the server. The SSH client will store that key and associate it with that one address or domain name. By default the storage location for those tuples is ~/.ssh/known_hosts, supplemented by /etc/ssh/ssh_known_hosts if pre-loaded by the system administrator.

2) When using key-based authentication, you are dealing with a different category than in your original post. Specifically, keys used for key-based authentications use a key-pair which identifies the SSH client session to the SSH server. You can have as many of those as you find usage for. The public key gets stored in the relevant account on the server in ~/.ssh/authorized_keys by default, though there are advanced alternatives. On the client, the full key pair usually gets stored in ~/.ssh/ or even a hardware token. You can name those key pairs whatever you want.

tldr; Before you identify your account to the server, the server proves its identity to your account. Each task uses separate pairs of keys.

--

¹ Although only one of any given type is actually used, technically the SSH server might offer several types, ECDSA, RSA, or Ed25519. According to your post, you are getting offered an ECDSA key.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not add ecdsa key to ssh-add Miati Linux - Newbie 1 01-16-2015 04:29 AM
[SOLVED] ECDSA fingerprint error after FreeBSD upgrade astrogeek *BSD 4 12-09-2014 01:18 AM
ssh: authenticity of host can't be established question opens x dialog joe_2000 Linux Mint 2 05-10-2014 06:09 AM
ECDSA key generation shyko Slackware 1 01-28-2011 01:40 AM
Is there a way to prevent this message:The authenticity of host can't be established. abefroman Linux - Server 8 11-27-2009 02:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration