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
SCP(1)                                                      BSD General Commands Manual                                                     SCP(1)

NAME
scp -- secure copy (remote file copy program) SYNOPSIS
scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same secu- rity as ssh(1). scp will ask for passwords or passphrases if they are needed for authentication. File names may contain a user and host specification to indicate that the file is to be copied to/from that host. Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing ':' as host specifiers. Copies between two remote hosts are also permitted. The options are as follows: -3 Copies between two remote hosts are transferred through the local host. Without this option the data is copied directly between the two remote hosts. Note that this option disables the progress meter. -4 Forces scp to use IPv4 addresses only. -6 Forces scp to use IPv6 addresses only. -B Selects batch mode (prevents asking for passwords or passphrases). -C Compression enable. Passes the -C flag to ssh(1) to enable compression. -c cipher Selects the cipher to use for encrypting the data transfer. This option is directly passed to ssh(1). -F ssh_config Specifies an alternative per-user configuration file for ssh. This option is directly passed to ssh(1). -i identity_file Selects the file from which the identity (private key) for public key authentication is read. This option is directly passed to ssh(1). -l limit Limits the used bandwidth, specified in Kbit/s. -o ssh_option Can be used to pass options to ssh in the format used in ssh_config(5). This is useful for specifying options for which there is no separate scp command-line flag. For full details of the options listed below, and their possible values, see ssh_config(5). AddressFamily BatchMode BindAddress CanonicalDomains CanonicalizeFallbackLocal CanonicalizeHostname CanonicalizeMaxDots CanonicalizePermittedCNAMEs CertificateFile ChallengeResponseAuthentication CheckHostIP Ciphers Compression ConnectionAttempts ConnectTimeout ControlMaster ControlPath ControlPersist GlobalKnownHostsFile GSSAPIAuthentication GSSAPIDelegateCredentials HashKnownHosts Host HostbasedAuthentication HostbasedKeyTypes HostKeyAlgorithms HostKeyAlias HostName IdentitiesOnly IdentityAgent IdentityFile IPQoS KbdInteractiveAuthentication KbdInteractiveDevices KexAlgorithms LogLevel MACs NoHostAuthenticationForLocalhost NumberOfPasswordPrompts PasswordAuthentication PKCS11Provider Port PreferredAuthentications ProxyCommand ProxyJump PubkeyAcceptedKeyTypes PubkeyAuthentication RekeyLimit SendEnv ServerAliveInterval ServerAliveCountMax StrictHostKeyChecking TCPKeepAlive UpdateHostKeys UsePrivilegedPort User UserKnownHostsFile VerifyHostKeyDNS -P port Specifies the port to connect to on the remote host. Note that this option is written with a capital 'P', because -p is already reserved for preserving the times and modes of the file. -p Preserves modification times, access times, and modes from the original file. -q Quiet mode: disables the progress meter as well as warning and diagnostic messages from ssh(1). -r Recursively copy entire directories. Note that scp follows symbolic links encountered in the tree traversal. -S program Name of program to use for the encrypted connection. The program must understand ssh(1) options. -v Verbose mode. Causes scp and ssh(1) to print debugging messages about their progress. This is helpful in debugging connection, authentication, and configuration problems. EXIT STATUS
The scp utility exits 0 on success, and >0 if an error occurs. SEE ALSO
sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh_config(5), sshd(8) HISTORY
scp is based on the rcp program in BSD source code from the Regents of the University of California. AUTHORS
Timo Rinne <tri@iki.fi> Tatu Ylonen <ylo@cs.hut.fi> BSD May 3, 2017 BSD