question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Specify alternative location for identity file

See original GitHub issue

It would be good if you could specify an alternative location for the identity file when the ssh key gets generated.

The reason being: I’m trying to debug ssh problems within my pipeline and when the ssh key is generated by the action it conflicts with the rest of my pipeline.

For example:

- name: Setup tmate session
  uses: mxschmitt/action-tmate@v2
  with:
    name: id_rsa_tmate

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
dschocommented, Nov 3, 2020

You all! This is a fantastic idea. And all you need to do is to implement it.

  1. The action.yml file needs to learn about a new input, say, id_rsa_filename (a good default seems to be "" for “leave the default alone”).

  2. Close to the location where the sudo input is interpreted, that new id_rsa_filename input needs to be read, say, via const idRSA = core.getInput("id_rsa_filename").

  3. That value needs to be used (if it is non-empty) instead of id_rsa in https://github.com/mxschmitt/action-tmate/blob/dfb94ec78701b33c98463d487c94fb5241e96942/src/index.js#L30. It would appear that something like this should work:

     await execShellCommand(`echo -e 'y\n'|ssh-keygen -q -t rsa -N "" -f ~/.ssh/${idRSA || "id_rsa"}`);
    
  4. Test, test, test. The absence of id_rsa_filename should fall back to using id_rsa. And a non-empty id_rsa_filename should use it. And an invalid file name should error out.

  5. Mention this in the README.md.

  6. Open a Pull Request.

1reaction
mxschmittcommented, Mar 24, 2021

Yeah! closed because of to little demand…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom Directory for SSH Identity Files - Unix Stack Exchange
Normally, the default directory is ~/.ssh , but I would like to specify (in the .ssh/config file I assume) a different location. I...
Read more >
How To Force SSH Client To Use Given Private Key/Identity File
Explains how to force SSH client to use given private key ( identity file ) under Linux, macOS, *BSD and Unix.
Read more >
How to tell git which private key to use? - Super User
Selects a file from which the identity (private key) for RSA or DSA authentication is read. The default is ~/.ssh/identity for protocol version...
Read more >
Creating an identity file - Sybase Infocenter
To place the identity file in a different location, you must specify the alternate location in the RS_ssl_identity entry in the configuration file....
Read more >
Setting the default ssh key location - Stack Overflow
-i identity_file Selects a file from which the identity (private key) for RSA or DSA authentication is read. The default is ~/.ssh/identity for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found