Re: SFTP - Private/Public Authentication Keysets Beyond The First Set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




On Wed, December 12, 2018 16:40, Gary Braatz wrote:
> Inclusion of the -i flag and the location of the private key solved
> the
> problem.
>

You can also set up a personalised ssh config file in the ~/.ssh
directory of the user employed to establish the sftp/ssh connections:

#BOF
# /home/myuser/.ssh/config

# Host parameter is any arbitrary string.
# sftp remoteuserid@xxxxxxxxxxxxxx ==
Host site1
    HostName               first.site.com
    User                   remoteuserid
    IdentityFile           /home/myuser/.ssh/id_rsa

# sftp otheruserid@xxxxxxxxxxxxxxxx ==
Host site2
    HostName               second.other.com
    User                   otheruserid
    IdentityFile           /home/myuser/.ssh/rsa_vendor2
#EOF

Then just run 'sftp site1' or 'sftp site2' to connect as required.

-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:ByrneJB@xxxxxxxxxxxxx
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux