Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Posted: 9/9/2024 9:10:53 PM EDT
[Last Edit: Bophades]
Im trying to set up an eventual ~/.config/autostart/ .desktop file for this.

Now currently, all my ssh-agent and ssh-add to then add my keys work.  I just cannot seem to get the
command gnome-terminal -- ssh-add
to do anything but just bring up a new gnome terminal. also tried the older
gnome-terminal --command ssh-add
and same damn thing.  also tried lots of combos using exec, and also sh -c and just nothing here works.


The system will happily do
gnome-terminal -- ssh-keygen
though, and pop up a new term where I see ssh-keygen was ran and its asking me about saving a key in a file which is 100% expected to happen there.  But for some reason ssh-add is special in some way?  wtf?  normally id expect ssh-add to ask me for the passphrase, and when running this command in an existing gnome-terminal it does just that... just cannot do the
command gnome-terminal -- ssh-add
where I can do the
command gnome-terminal -- ssh-keygen


Why doesnt
command gnome-terminal -- ssh-add
pop up a new gnome-terminal asking my for the passphrase??
Link Posted: 9/10/2024 12:24:37 PM EDT
[#1]
Have you tried:

gnome-terminal -e ssh-add

?

Or the more generic "xterm -e ssh-add"

Link Posted: 9/10/2024 4:00:03 PM EDT
[#2]
niether of those work.
wtf.
there is somehow something really "special" about ssh-add i guess?
Link Posted: 9/10/2024 4:39:47 PM EDT
[#3]
Well #1, gnome is poop and has been since gnome 3, so stuff like this doesn't surprise me.

Maybe try it without "command"?

gnome-terminal --ssh-add


Also, you're not running it with any arguments, don't know that much about doing that myself but here's what the man page says about it:

When run without arguments, it adds the
    files ~/.ssh/id_rsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk,
    ~/.ssh/id_ed25519, ~/.ssh/id_ed25519_sk, and ~/.ssh/id_dsa.
    After loading a private key, ssh-add will try to load corre‐
    sponding certificate information from the filename obtained by
    appending -cert.pub to the name of the private key file.  Al‐
    ternative file names can be given on the command line.

Link Posted: 9/10/2024 9:20:05 PM EDT
[#4]
Discussion ForumsJump to Quoted PostQuote History
Originally Posted By Dragynn:
Well #1, gnome is poop and has been since gnome 3, so stuff like this doesn't surprise me.

Maybe try it without "command"?

gnome-terminal --ssh-add


Also, you're not running it with any arguments, don't know that much about doing that myself but here's what the man page says about it:

When run without arguments, it adds the
    files ~/.ssh/id_rsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk,
    ~/.ssh/id_ed25519, ~/.ssh/id_ed25519_sk, and ~/.ssh/id_dsa.
    After loading a private key, ssh-add will try to load corre‐
    sponding certificate information from the filename obtained by
    appending -cert.pub to the name of the private key file.  Al‐
    ternative file names can be given on the command line.

View Quote View All Quotes
View All Quotes
Discussion ForumsJump to Quoted PostQuote History
Originally Posted By Dragynn:
Well #1, gnome is poop and has been since gnome 3, so stuff like this doesn't surprise me.

Maybe try it without "command"?

gnome-terminal --ssh-add


Also, you're not running it with any arguments, don't know that much about doing that myself but here's what the man page says about it:

When run without arguments, it adds the
    files ~/.ssh/id_rsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk,
    ~/.ssh/id_ed25519, ~/.ssh/id_ed25519_sk, and ~/.ssh/id_dsa.
    After loading a private key, ssh-add will try to load corre‐
    sponding certificate information from the filename obtained by
    appending -cert.pub to the name of the private key file.  Al‐
    ternative file names can be given on the command line.



oh that first one.
$ gnome-terminal --ssh-add
# Failed to parse arguments: Unknown option --ssh-add

I also see what you wrote there on the default behavior, and so tried
gnome-terminal -- ssh-add /home/Bophades/.ssh/id_rsa

which doesnt work as an autostart, but again works great when done directly from xterm/whatever

I did also see this in the man page:

If  any  file  requires  a  passphrase,  ssh-add asks for the passphrase from the user.  The passphrase is read from the
      user's tty.


i wonder if the autostart cant figure out the tty is on the new terminal or something
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top