login about faq

I'm often in the following situation:

From my Linux host I connect to a remote server using a terminal connection and authenticate using password.

sshg3 user@server

Now I would like to upload my public key (which I already generated) to this server in order to setup public-key authentication. At this point I have the following options:

a. Use scpg3

In a separate terminal, use scpg3 to upload the public key file to the right location. Assuming the server is Tectia, it would be something like:

scpg3 mypubkey.pub user@server:.ssh2/authorized_keys/

b. Use ssh-broker-ctl

In a separate terminal, use the ssh-broker-ctl upload-key command to upload the key

ssh-broker-ctl upload-key mypubkey.pub user@server

c. Use the Tectia configuration GUI

I can also use the Tectia configuration graphical application and use the wizard

ssh-tectia-configuration &

Option a requires more work for different SSH servers, option c is only available for Linux if I have the ssh-tectia-configuration-gui package installed and all of the above require that I disconnect or change to another terminal and do something.

Isn't there an easier way to do this directly from the terminal?

asked Sep 19 '11 at 15:49

Roman's gravatar image

Roman ♦♦

Use key upload escape sequence

As of version 6.2 of Tectia Client you can do this directly from the terminal by using the key upload escape sequence.

How does it work?

  1. Connect to the server as above
    sshg3 user@server
  2. Use the key upload escape sequence (~u)


If you only have one public-key pair it will automatically upload the public key of that pair. Otherwise it will upload a key that matches the following format, where size is the size of the key:

If there are keys with multiple sizes the one with the largest size will be uploaded.

Additionally using the ~U escape sequence will display a list of keys from which to select the one to upload.

Note that this only works if you have Tectia Client 6.2.0 or newer and only for Unix.


answered Sep 19 '11 at 15:58

Roman's gravatar image

Roman ♦♦

edited Sep 19 '11 at 16:00

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Sep 19 '11 at 15:49

Seen: 5,296 times

Last updated: Sep 19 '11 at 16:00

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.