top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

ssh and svn+ssh with different keys

+2 votes
570 views

Is there way to use two different keys for ssh authentication on one machine for the same user to login the same server? I need one key for svn+ssh to run command on remote server and the other key to login and work from shell on that same server.

posted Jul 28, 2014 by Dewang Chaudhary

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

ssh -i allows you to use a different identity than the default ~/.ssh/id_[d|r]sa" file.

answer Jul 28, 2014 by Bob Wise
Solved. The problem was that ssh-copy-id didnt copied rsa.pub. Pasted it manually to .ssh/authorized_keys on server side. Now everything works like a charm.
Similar Questions
+3 votes

Trying to see if ssh/port forwarding can be used to solve a prob. I want to have multiple clients connected to a single master server

The masterServer/app is providing data on port X
The clientNodes/apps should then listen on port X

ssh allows for port forwarding, but I can't figure out how to accomplish this using ssh/port forwarding.

I've tried using :
ssh -L 8000:localhost:8000 bob@foo.com -p abc
as foo.com:abc is the vm ip/port that's the server app

I then did a test using nc where on the serverside, I did a nc -l 8000, and got an err msg indicating the port was already in use

Port 8000 is the port the server app sends data on, and is the port I'd like to listen on on the clientnodes/apps..

+5 votes

We access our Subversion repositories mainly via svn+ssh:// on a central server. We limit access to the repos using Unix group membership. For example, the repo for ProjectA has 770 permissions and belongs to GroupA and ProjectB also has 770 permission and belongs to GroupB. So users who are in GroupA can access ProjectA and users in GroupB can access ProjectB. The file permissions look like this:

 drwxrws--- 7 svn GroupA 4096 Dec 27 2009 ProjectA
 drwxrws--- 7 svn GroupB 4096 Dec 27 2009 ProjectB

Everything is working as expected so far. Users in each group can only access their respective projects, and users in both groups can access both projects. But now we want to prevent a subset of users in GroupB from accessing certain subtrees of ProjectB. Can this be done when using svn+ssh:// access? If so, how?

0 votes

I am trying to create one SSH tunnel, so that i can connect from a python script running on my pc, to a remote MySQL database running on my Host and id like to stick with Python 3.3 .

I contacted my host and he informed me that this is the only way.

I tried pycrypto + paramiko but from what i have noticed, paramiko is not Python 3.3 ready. Any thoughts?

+2 votes

I have function in python,(Assume that i have imported all necessary module),

 def DL_Iperf(args):
        ssh=paramiko.SSHClient()
        ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        ssh.connect(server_ip,username="root",password=Password)
some_code

This function is actually a thread and it will be created as many no of UE i have, (Ex: if i have 1 UE than 1 Thread will be created),

So, if i have 1 UE/ 2 UE than its working but if i have 3 UE then it is failing, with error "Paramiko : Error reading SSH protocol banner",

Below is the stderr of the script,

    No handlers could be found for logger "paramiko.transport"

    Unhandled exception in thread started by <function DL_Iperf at 0x02B8ACF0>
    Traceback (most recent call last):

    File "C:\Users\qxdm-5\Desktop\Chirag\LTE_11_Perfect_Working\TCP_Latest_2\Windo
    ws_UE\slave.py", line 379, in DL_Iperf

    ssh.connect(ServerIp,username="root",password=Pwd)

    File "build\bdist.win32\egg\paramiko\client.py", line 295, in connect

    File "build\bdist.win32\egg\paramiko\transport.py", line 451, in start_client

paramiko.SSHException: Error reading SSH protocol banner

From some reference i found that this is because of some network related issue, but my question is if it network related then why everytime in 3rd call of the function i am getting this error? And how do i resolve it?

...