this post was submitted on 13 Nov 2023
19 points (85.2% liked)

Python

6368 readers
19 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] Oha@lemmy.ohaa.xyz 1 points 1 year ago (3 children)

Then any time you run ssh myserver.net, it'll use the user you specify here by default.

Wouldnt really help in my use case bc I use the same user on every server

[โ€“] Fal@yiffit.net 6 points 1 year ago (1 children)

It was just an example. What does your script do that wouldn't be configurable in ssh config

[โ€“] Oha@lemmy.ohaa.xyz 0 points 1 year ago* (last edited 1 year ago)

not much, probably. Ill add some features in the future tho

[โ€“] __init__@programming.dev 2 points 1 year ago

The โ€œhostโ€ is just your friendly name for the connection, not necessarily the hostname of the remote host. You can specify the same username or hostname as many times as you want. My config is made up of mostly blocks like this:

Host server1
    HostName server1.you.com
    User your_ssh_username
    IdentityFile ~/.ssh/yourprivatekey.pem
  
Host server2
    HostName server2.you.com
    User your_ssh_username
    IdentityFile ~/.ssh/yourprivatekey.pem