Sponsored Content
Special Forums UNIX and Linux Applications What is the difference between /etc/ssh/ and ~/.ssh? Post 303016268 by MadeInGermany on Monday 23rd of April 2018 03:07:18 PM
Old 04-23-2018
The next connection will compare the server's public host key with the one in known_hosts.
If different it will warn "host key changed, perhaps a man-in-the-middle attack".
--
To complete your confusion, there is also an optional /etc/ssh/known_hosts. Here the administrator can store public host keys that are valid for all the users on the system, so they do not need to store them in their ~/.ssh/known_hosts.
--
Extra user keys that you put in ~/.ssh/ can be used to replace a password login (enabling a password-less login). The accepted public user keys are stored on the accessing side in ~/ssh/authorized_key (or ~/ssh/authorized_key2, dependent on the ssh version).
This User Gave Thanks to MadeInGermany For This Post:
 

9 More Discussions You Might Find Interesting

1. Cybersecurity

What's the difference between an SSH Client and an SSH Server?

Eh... yeah. What the title says. :D (1 Reply)
Discussion started by: PSC
1 Replies

2. UNIX for Advanced & Expert Users

difference between logging into unix through f-secure ssh client and telnet

hi, what is the difference between logging into unix through f-secure ssh client and telnet is there any more security check is involved can any one explain thanks in advance (1 Reply)
Discussion started by: trichyselva
1 Replies

3. Shell Programming and Scripting

could not send commands SSH session with Net::SSH::Expect

I am using Net::SSH::Expect to connect to the device(iLO) with SSH. After the $ssh->login() I'm able to view the prompt, but not able to send any coommands. With the putty I can connect to the device and execute the commands without any issues. Here is the sample script my $ssh =... (0 Replies)
Discussion started by: hansini
0 Replies

4. Shell Programming and Scripting

Using ssh to add register key on ssh server

Hi, I want to use ssh to add a register key on remote ssh server. Since there are space characters in my register key string, it always failed. If there is no space characters in the string, it worked fine. The following is what I have tried. It seems that "ssh" command doesn't care about double... (9 Replies)
Discussion started by: leaftree
9 Replies

5. Solaris

what is the difference between openssh and ssh package installed with Solaris box

which should i prefer to install in my system openssh or ssh package provided by SUN by default. can i have two packages installed at the same time? (2 Replies)
Discussion started by: chidori
2 Replies

6. Shell Programming and Scripting

Ssh = ssh expect and keep everything not change include parameter postion

I have write a script which contains ssh -p 12345 dcplatform@10.125.42.50 ssh 127.0.0.1 -p 5555 "$CMD" ssh root@$GUEST_IP "$CMD" before I use public key, it works well, now I want to change to "expect", BUT I don't want to change above code and "parameter position" I can post a... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

7. Shell Programming and Scripting

Check if file exists via ssh in ssh (nested)

I'm using redhat and have an odd issue with a nested ssh call. ssh -i ~/.ssh/transfer-key -q transfer@fserver1 ] && ssh -i ~/.ssh/transfer-key transfer@fserver1 "ssh -i ~/.ssh/sftp-key sftpin@10.0.0.1 ]" && ssh -i ~/.ssh/transfer-key transfer@fserver1 "scp -i ~/.ssh/sftp-key /home/S/outbox/*... (2 Replies)
Discussion started by: say170
2 Replies

8. UNIX for Beginners Questions & Answers

Ssh script to validate ssh connection to multiple serves with status

Hi, I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not... I have .sh script like below and i have servers.txt contains all the list of servers #/bin/bash for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies

9. Shell Programming and Scripting

Find active SSH servers w/ ssh keys on LAN

Hi, I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step: #!/bin/bash # LAN SSH KEYS DISCOVERY SCRIPT </etc/passwd \ grep /bin/bash | cut -d: -f6 | sudo xargs -i -- sh -c ' && cat... (11 Replies)
Discussion started by: syrius
11 Replies
SSS_SSH_KNOWNHOSTSPR(1) 					 SSSD Manual pages					   SSS_SSH_KNOWNHOSTSPR(1)

NAME
sss_ssh_knownhostsproxy - get OpenSSH host keys SYNOPSIS
sss_ssh_knownhostsproxy [options] HOST [PROXY_COMMAND] DESCRIPTION
sss_ssh_knownhostsproxy acquires SSH host public keys for host HOST, stores them in a custom OpenSSH known_hosts file (see the "SSH_KNOWN_HOSTS FILE FORMAT" section of sshd(8) for more information) /var/lib/sss/pubconf/known_hosts and estabilishes connection to the host. If PROXY_COMMAND is specified, it is used to create the connection to the host instead of opening a socket. ssh(1) can be configured to use sss_ssh_knownhostsproxy for host key authentication by using the following directives for ssh(1) configuration: ProxyCommand /usr/bin/sss_ssh_knownhostsproxy -p %p %h GlobalKnownHostsFile2 /var/lib/sss/pubconf/known_hosts This is an experimental feature, please use http://fedorahosted.org/sssd to report any issues. OPTIONS
-p,--port PORT Use port PORT to connect to the host. By default, port 22 is used. -d,--domain DOMAIN Search for host public keys in SSSD domain DOMAIN. -h,--help Display help message and exit. SEE ALSO
ssh(8), ssh_config(5), sss_ssh_authorizedkeys(1). AUTHORS
The SSSD upstream - http://fedorahosted.org/sssd SSSD
03/04/2013 SSS_SSH_KNOWNHOSTSPR(1)
All times are GMT -4. The time now is 04:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy