Simply adding to SSH known_host without forcing an error? The Next CEO of Stack OverflowSSH HTTP Tunnellingssh -> screen -> ssh - how to kill remote screened ssh without killing original ssh sessionHow do I install known_host keys for ssh manually?Why does SSH add a known_host entry for an IP address?How to roll over ssh host keys?SSH ec2 goes to private IPSSH to older Linux box using remote port forwardingWhat is the recommended way to retrieve host and repository from git URLAuthenticate SSH session from detached screen session on Server to Other Server without password auth and without storing keys on ServerHow to ssh forwarding with AllowTcpForwarding set to no?

What CSS properties can the br tag have?

In the "Harry Potter and the Order of the Phoenix" video game, what potion is used to sabotage Umbridge's speakers?

What connection does MS Office have to Netscape Navigator?

TikZ: How to fill area with a special pattern?

Is it convenient to ask the journal's editor for two additional days to complete a review?

What steps are necessary to read a Modern SSD in Medieval Europe?

Lucky Feat: How can "more than one creature spend a luck point to influence the outcome of a roll"?

How do you define an element with an ID attribute using LWC?

Why did early computer designers eschew integers?

Towers in the ocean; How deep can they be built?

What does "shotgun unity" refer to here in this sentence?

Spaces in which all closed sets are regular closed

From jafe to El-Guest

Is there such a thing as a proper verb, like a proper noun?

Vector calculus integration identity problem

What are the unusually-enlarged wing sections on this P-38 Lightning?

Where do students learn to solve polynomial equations these days?

It is correct to match light sources with the same color temperature?

Strange use of "whether ... than ..." in official text

Is it okay to majorly distort historical facts while writing a fiction story?

Film where the government was corrupt with aliens, people sent to kill aliens are given rigged visors not showing the right aliens

Ising model simulation

What day is it again?

How to calculate the two limits?



Simply adding to SSH known_host without forcing an error?



The Next CEO of Stack OverflowSSH HTTP Tunnellingssh -> screen -> ssh - how to kill remote screened ssh without killing original ssh sessionHow do I install known_host keys for ssh manually?Why does SSH add a known_host entry for an IP address?How to roll over ssh host keys?SSH ec2 goes to private IPSSH to older Linux box using remote port forwardingWhat is the recommended way to retrieve host and repository from git URLAuthenticate SSH session from detached screen session on Server to Other Server without password auth and without storing keys on ServerHow to ssh forwarding with AllowTcpForwarding set to no?










0















I have two machines devbox, and gitbox. The second machine, gitbox is a development box that has no shell, and is very locked down just to afford git over ssh (there isn't access to /bin/true even)



What I want to do is add to devbox's .ssh/known_hosts the entry for gitbox. Currently what I do is,



ssh -oStrictHostKeyChecking=no git.server.com __NOOP__


This does what I want, but it has to attempt to run __NOOP__, ideally I would like to just add to the known_hosts file.



Is there a method of doing this?










share|improve this question






















  • ssh -N git.server.com then Control-C. Or ssh -s git.server.com no_such_subsystem.

    – mosvy
    yesterday












  • Running something doesn't exist such as a __NOOP__ or no_such_subsystem is what I'm trying not to do, and the ^C won't work as i'm doing this in a script.

    – Evan Carroll
    yesterday











  • A sshd subsystem is not run as a separate command. Look up the -s option in the manpage. You can also do a remote forwarding guaranteed to fail with -N: ssh -o ExitOnForwardFailure=yes -N -R 80:localhost:8880 (if not running as root on the remote machine)

    – mosvy
    yesterday
















0















I have two machines devbox, and gitbox. The second machine, gitbox is a development box that has no shell, and is very locked down just to afford git over ssh (there isn't access to /bin/true even)



What I want to do is add to devbox's .ssh/known_hosts the entry for gitbox. Currently what I do is,



ssh -oStrictHostKeyChecking=no git.server.com __NOOP__


This does what I want, but it has to attempt to run __NOOP__, ideally I would like to just add to the known_hosts file.



Is there a method of doing this?










share|improve this question






















  • ssh -N git.server.com then Control-C. Or ssh -s git.server.com no_such_subsystem.

    – mosvy
    yesterday












  • Running something doesn't exist such as a __NOOP__ or no_such_subsystem is what I'm trying not to do, and the ^C won't work as i'm doing this in a script.

    – Evan Carroll
    yesterday











  • A sshd subsystem is not run as a separate command. Look up the -s option in the manpage. You can also do a remote forwarding guaranteed to fail with -N: ssh -o ExitOnForwardFailure=yes -N -R 80:localhost:8880 (if not running as root on the remote machine)

    – mosvy
    yesterday














0












0








0


1






I have two machines devbox, and gitbox. The second machine, gitbox is a development box that has no shell, and is very locked down just to afford git over ssh (there isn't access to /bin/true even)



What I want to do is add to devbox's .ssh/known_hosts the entry for gitbox. Currently what I do is,



ssh -oStrictHostKeyChecking=no git.server.com __NOOP__


This does what I want, but it has to attempt to run __NOOP__, ideally I would like to just add to the known_hosts file.



Is there a method of doing this?










share|improve this question














I have two machines devbox, and gitbox. The second machine, gitbox is a development box that has no shell, and is very locked down just to afford git over ssh (there isn't access to /bin/true even)



What I want to do is add to devbox's .ssh/known_hosts the entry for gitbox. Currently what I do is,



ssh -oStrictHostKeyChecking=no git.server.com __NOOP__


This does what I want, but it has to attempt to run __NOOP__, ideally I would like to just add to the known_hosts file.



Is there a method of doing this?







ssh openssh






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 days ago









Evan CarrollEvan Carroll

6,055114585




6,055114585












  • ssh -N git.server.com then Control-C. Or ssh -s git.server.com no_such_subsystem.

    – mosvy
    yesterday












  • Running something doesn't exist such as a __NOOP__ or no_such_subsystem is what I'm trying not to do, and the ^C won't work as i'm doing this in a script.

    – Evan Carroll
    yesterday











  • A sshd subsystem is not run as a separate command. Look up the -s option in the manpage. You can also do a remote forwarding guaranteed to fail with -N: ssh -o ExitOnForwardFailure=yes -N -R 80:localhost:8880 (if not running as root on the remote machine)

    – mosvy
    yesterday


















  • ssh -N git.server.com then Control-C. Or ssh -s git.server.com no_such_subsystem.

    – mosvy
    yesterday












  • Running something doesn't exist such as a __NOOP__ or no_such_subsystem is what I'm trying not to do, and the ^C won't work as i'm doing this in a script.

    – Evan Carroll
    yesterday











  • A sshd subsystem is not run as a separate command. Look up the -s option in the manpage. You can also do a remote forwarding guaranteed to fail with -N: ssh -o ExitOnForwardFailure=yes -N -R 80:localhost:8880 (if not running as root on the remote machine)

    – mosvy
    yesterday

















ssh -N git.server.com then Control-C. Or ssh -s git.server.com no_such_subsystem.

– mosvy
yesterday






ssh -N git.server.com then Control-C. Or ssh -s git.server.com no_such_subsystem.

– mosvy
yesterday














Running something doesn't exist such as a __NOOP__ or no_such_subsystem is what I'm trying not to do, and the ^C won't work as i'm doing this in a script.

– Evan Carroll
yesterday





Running something doesn't exist such as a __NOOP__ or no_such_subsystem is what I'm trying not to do, and the ^C won't work as i'm doing this in a script.

– Evan Carroll
yesterday













A sshd subsystem is not run as a separate command. Look up the -s option in the manpage. You can also do a remote forwarding guaranteed to fail with -N: ssh -o ExitOnForwardFailure=yes -N -R 80:localhost:8880 (if not running as root on the remote machine)

– mosvy
yesterday






A sshd subsystem is not run as a separate command. Look up the -s option in the manpage. You can also do a remote forwarding guaranteed to fail with -N: ssh -o ExitOnForwardFailure=yes -N -R 80:localhost:8880 (if not running as root on the remote machine)

– mosvy
yesterday











1 Answer
1






active

oldest

votes


















1














Try ssh-keyscan , then append the output to ~/.ssh/known_hosts



ssh-keyscan git.server.com >> ~/.ssh/known_hosts





share|improve this answer























  • never used -keyscan I'll check it out when I get back to the ofc.

    – Evan Carroll
    yesterday











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f509504%2fsimply-adding-to-ssh-known-host-without-forcing-an-error%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Try ssh-keyscan , then append the output to ~/.ssh/known_hosts



ssh-keyscan git.server.com >> ~/.ssh/known_hosts





share|improve this answer























  • never used -keyscan I'll check it out when I get back to the ofc.

    – Evan Carroll
    yesterday















1














Try ssh-keyscan , then append the output to ~/.ssh/known_hosts



ssh-keyscan git.server.com >> ~/.ssh/known_hosts





share|improve this answer























  • never used -keyscan I'll check it out when I get back to the ofc.

    – Evan Carroll
    yesterday













1












1








1







Try ssh-keyscan , then append the output to ~/.ssh/known_hosts



ssh-keyscan git.server.com >> ~/.ssh/known_hosts





share|improve this answer













Try ssh-keyscan , then append the output to ~/.ssh/known_hosts



ssh-keyscan git.server.com >> ~/.ssh/known_hosts






share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









FitzFitz

1852




1852












  • never used -keyscan I'll check it out when I get back to the ofc.

    – Evan Carroll
    yesterday

















  • never used -keyscan I'll check it out when I get back to the ofc.

    – Evan Carroll
    yesterday
















never used -keyscan I'll check it out when I get back to the ofc.

– Evan Carroll
yesterday





never used -keyscan I'll check it out when I get back to the ofc.

– Evan Carroll
yesterday

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f509504%2fsimply-adding-to-ssh-known-host-without-forcing-an-error%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.