ProxyCommand with different keys

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat ProxyCommand with different keys
# 1  
Old 10-11-2011
ProxyCommand with different keys

Hello all,

simple network problem:

host1 -> jumphost -> host2

alias ss='ssh -t -q user2@jumphost -q -t -t ssh -l user2 '

ss host2 works like a charm but scp and scripts don't cooperate very much (normal).

My ssh key (user1) is already deployed on jumphost but NOT on host2 as i'm using the user2's key. I could probably deploy my key (user1) on the host2 but i would prefer not atm (i have ALOT of servers and don't wanna have to deploy on each server individually). User2's key is already deployed accross the park.

But thats probably the reason why my proxycommand fails...

Code:
Host jumphost
    User user2
    HostName jumphost
    ProxyCommand none
    IdentityFile ~/.ssh/id_dsa

Host host2
    User    user2
    HostName host2
    #ProxyCommand ssh -l user2 -W host2:22 jumphost 
    ProxyCommand ssh jumphost nc %r %h 22

Of course ssh jumphost works without any issues.

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Web Development

Duplicate Keys

I am trying to insert csv data into a table mysql> load data infile '/var/www/PLU.csv' into table Food2 fields terminated by ',' enclosed by '"' lines terminated by '\n' ; ERROR 1062 (23000): Duplicate entry '4014' for key 'PRIMARY' ... (4 Replies)
Discussion started by: Meow613
4 Replies

2. Solaris

help with SSH keys

Hello, I could use some help with my ssh keys and agent. This is the issue. I have 2 different UNIX systems at work. One is the normal Solaris servers with my uid being the same throughout all the servers. I now have a different system for my desktop. A contractor came in and installed some SUN... (0 Replies)
Discussion started by: bitlord
0 Replies

3. UNIX for Advanced & Expert Users

sftp with proxycommand -AIX

Hi , I am trying to do an sftp using below command -AIX sftp -oProxyCommand='/usr/bin/ksh -v -xproxyname:portno remotehostname remoteport' user@remotehostname:port But I getting error message: remotehost: bad option(s) ssh_exchange_identification: Connection closed by remote host... (4 Replies)
Discussion started by: sagar_un
4 Replies

4. Shell Programming and Scripting

Up and Down keys for history?

I am working in a shell, and I am used to using the up and down keys as a shortcut for the history of input commands, but it does not work for me on my new shell and computer. is there a variable i have to set or something i have to configure to do make the up and down keys do something?? ... (6 Replies)
Discussion started by: vas28r13
6 Replies

5. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra (1 Reply)
Discussion started by: ravi3cha
1 Replies

6. UNIX for Dummies Questions & Answers

SSH keys

Hi everyone, i wanted to generate ssh keys so that i can include the public key in the remote sever, so that for subsequent logins, i can do away with the keying in of the password. I consulted the man ssh-keygen man pages. "..Normally each user wishing to use SSH with RSA or DSA... (1 Reply)
Discussion started by: new2ss
1 Replies

7. Shell Programming and Scripting

Hot Keys

I am a new user, using Unix in a DOS window. Can I set up Hot Keys to run a script? Example - A12.1.13.15 aaaaBbbbCccc Thank you, cwtlr (8 Replies)
Discussion started by: cwtlr
8 Replies

8. UNIX for Dummies Questions & Answers

Hot Keys

I am a new user, using UNIX in a DOS window. Is there a way to code a "Hot Key" for a string of commands? Thanks. (2 Replies)
Discussion started by: cwtlr
2 Replies

9. UNIX for Dummies Questions & Answers

arrow keys / special keys

how to use the arrow keys in shell scripting. is there any special synatax / command for this. i just want to use the arrow keys for navigation. replies appreciated raguram R (3 Replies)
Discussion started by: raguramtgr
3 Replies
Login or Register to Ask a Question
SSH-COPY-ID(1)						    BSD General Commands Manual 					    SSH-COPY-ID(1)

NAME
ssh-copy-id -- copy public keys to a remote host SYNOPSIS
ssh-copy-id [-lv] [-i keyfile] [-o option] [-p port] [user@]hostname DESCRIPTION
The ssh-copy-id utility copies public keys to a remote host's ~/.ssh/authorized_keys file (creating the file and directory, if required). The following options are available: -i file Copy the public key contained in file. This option can be specified multiple times and can be combined with the -l option. If a private key is specified and a public key is found then the public key will be used. -l Copy the keys currently held by ssh-agent(1). This is the default if the -i option was not specified. -o ssh-option Pass this option directly to ssh(1). This option can be specified multiple times. -p port Connect to the specified port on the remote host instead of the default. -v Pass -v to ssh(1). The remaining arguments are a list of remote hosts to connect to, each one optionally qualified by a user name. EXIT STATUS
The ssh-copy-id utility exits 0 on success, and >0 if an error occurs. EXAMPLES
To send a specific key to multiple hosts: $ ssh-copy-id -i /path/to/keyfile.pub user@host1 user@host2 user@host3 HISTORY
The ssh-copy-id utility was written by Eitan Adler <eadler@FreeBSD.org> as a drop-in replacement for an existing utility included with OpenSSH. BSD
February 28, 2014 BSD