login about faq

I'm tired of always having to type my password when connecting to the same remote hosts.

How do I setup public key authentication so that I can use the same key to connect to multiple hosts without having to type the password every time?

asked Oct 07 '09 at 18:47

SSH%20KB's gravatar image


edited Feb 22 '11 at 11:59

Roman's gravatar image

Roman ♦♦

To upload a key using Tectia Client version 6.1.0 or newer using ssh-broker-ctl

The instructions below assume that you have Tectia Client version 6.1.0 or newer. If you have an older version of Tectia Client or would prefer to do this manually see this question.

1. First start Tectia Connection Broker:

$ ssh-broker-g3

2. If you don't already have a public key create one by running:

$ ssh-keygen-g3 mykey

This will prompt for a passphrase for the key and create a public key pair (mykey and mykey.pub) in the following location:
in Unix:


in Windows:

%USERPROFILE%\Application Data\SSH\UserKeys\ 

3. Make sure broker can find the key by running:

$ ssh-broker-ctl list-keys

This will output something like:

  1. ssh-dss [hash #cfd86e3b9f9480384a207af98d4ab8a39e0cda4d] File name: /home/joe/.ssh2/mykey
    File format: SecSH 2 Label: 2048-bit dsa, joe@myhost, Wed O...
    Key provider: software://0/
    Key path: software://0/directory_key(/home/joe/.ssh2/mykey)... Protected key [authentication code not provided] Type: 2048 bit dsa key SHA-1: cfd86e3b9f9480384a207af98d4ab8a39e0cda4d xufot-moruf-relin-gubyf-moded-bovaz-nyfig-puvup-fyleb-sikyg-tixux

4. Then upload the key using this command:

$ ssh-broker-ctl key-upload /home/pyuser/.ssh2/mykey.pub remotehost

You'll get prompted for password for remotehost and the key is automatically uploaded.

$ joe@localhost's password: 
$ Key uploaded succesfully to 'remotehost'.

Alternatively instead of specifying the path to the key you can give the key id (from the output in step 3):

$ ssh-broker-ctl key-upload 1 remotehost

After this when connecting to remotehost you'll get prompted for the passphrase for your key (the key only needs to be decoded once as long as the ssh-broker-g3 process is running):

$ sshg3 localhost
Key label: 2048-bit dsa, joe@myhost, Wed Oct 07 2009 23:02:31 +0300
File name: /home/pyuser/.ssh2/mykey
Passphrase for the private key: 
Authentication successful.

This should work against any SSH server.

*Note that public key authentication must be allowed by the server configuration.


answered Oct 07 '09 at 20:40

Roman's gravatar image

Roman ♦♦

edited Sep 20 '11 at 09:38

what if vice-versa where the client is unix ssh, and server is tectia windows server?

(Nov 16 '11 at 06:38) siakhooi siakhooi's gravatar image

What are the instructions to import the Public key on a Tectia Windows server? A client has sent us their public key

(Nov 23 '11 at 16:44) Imran Ali Imran%20Ali's gravatar image


Add the key to the following: %USERPROFILE%\.ssh2\authorized_keys

Please review: http://www.tectia.com/manuals/server-admin/62/userauth-pk.html

Thanks, James

(Dec 05 '11 at 14:27) jamesw jamesw's gravatar image
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: Oct 07 '09 at 18:47

Seen: 25,216 times

Last updated: Dec 22 '11 at 20:33

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