I want to connect a linux machine via ssh. Linux server just accept key authentication.
"execute ssh" command does not have an option to use public key file.
How can i upload my ssh public key? And how can i use?
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hi ferhan,
if I got it correctly then you would like to originate connection to your server (which requires key authentication) from your FortiGate.
If so, then I'm afraid you would need to use some another jump-host then FortiGate.
FortiGate does have 'exec ssh-option' to define some extra properties of future SSH connections originated directly from FortiGate itself, but auth key is not there, yet.
Tomas Stribrny - NASDAQ:FTNT - Fortinet Inc. - TAC Staff Engineer
AAA, MFA, VoIP and other Fortinet stuff
Hey farhan, as i recognized your issue is in authentication part , follow this steps to solve it :
First, Log in to the computer you’ll use for accessing the remote host, and use the command line SSH to generate a key pair by the RSA algorithm. To generate RSA keys, type the following on the command line, and click on enter:
ssh-keygen -t rsa
You will have to give a filename to save the key pair and a password to protect your private key. If you want to continue with the default filename and location for your key pair, click on Enter or Return without entering a filename. Alternatively, you can enter a filename such as My_ssh_key at the prompt and press Enter or Return. Pay attention that many remote hosts are configured to accept private keys with the default filename and path. Therefore, you must explicitly invoke this on the SSH command line or in an SSH client configuration file (~/.ssh/config).
You need to enter a password with at least five characters and click Enter or Return. If you click on Enter without a password, it will generate your private key without password protection.
Use SFTP or SCP for copying the public key file to your account on the remote system.
Your public key will be duplicated to your home directory and kept with the same filename on the remote system.
Log in to the remote system with your account username and password
mkdir -p ~/.ssh
touch ~/.ssh/authorized_keys
I also use this source : https://cloudzy.com/knowledge-base/ssh-remote-connection/#How_to_Setup_SSH_Public_Key_Authentication...
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1672 | |
1083 | |
752 | |
446 | |
226 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.