The error: ssh to localhost on port 60000 demands password. Feels like a newbie error, but I just need some help id'ing what I'm missing.
Background: I'm managing multiple environments and each one is in a DMZ. Some are in separate DMZs than others, which means each one has a jump host. I basically want to rsync some files across 4 hops from one sys to another through my laptop and a jump host.
The systems: sys_with_files in env faraway
laptop in corp network then vpn'ed w/ access to faraway 1 and 2 jump_host in env faraway2 sys_wants_files in env faraway2 behind jump_host
Setup: I'm executing from a nat'ed virtualbox vm behind a laptop over VPN b/c it's the only system with access to all the endpoints. I can't get passwords to a lot of the systems (or change ones where I have root access from something I don't know to something I do), but I do have key access for most.
I'm going to try to skip as much minutiae as I think I can get away w/.
Step 1: a) Setup config file for proxy under home/my_username/.ssh/config. It has: Host sys_wants_files User root ProxyCommand ssh -1 root@sys_wants_files -W "%h":"%p" Host sys_with_files IdentityFile /home/my_username/.ssh/id_rsa b) Test access - logged in as my_username successfully using "ssh sys_wants_files"
Step 2: a) setup tunnel with root@laptop# "ssh -v -R 60000:sys_wants_files:60001 sys_with_files" --> no password needed and sends me to remote machine just fine. debug1: remote forward success for: listen 60000, connect sys_wants_files:60001
Step 3: a) Open second term on laptop b) root@laptop# ssh sys_with_files --> logs in w/o pass as my_username (my_username@sys_with_files#) c) telnet localhost 60000 --> conected, ssh-2.0-OpenSSH_6.6.1. Terminal with the tunnel prints "debug1: channel 1: connected to sys_wants_files port 60001".
Here's the problem. These all fail: d) -ssh -v -p 60000 localhost --> requires my_username password, which doesn't exist --> fails -Add key to root authorized_keys and ssh -v -i /home/my_username/.ssh/id_rsa -p 60000 localhost --> asks for password -become root and add key to itself and do "ssh -v -i /root/.ssh/id_rsa -p 60000 localhost" --> asks for password -ssh to hostname instead of localhost is refused -rsync -avz -e "ssh -p 60000" file localhost:/root/file_again" --> bunch of variations ask for password
I attempted many solutions beyond the stuff above, but I'm not getting anywhere. Any ideas?
The auth log repeatedly shows: timestamp hostname sshd[26523] connection closed by 127.0.0.1 [preauth]
Aucun commentaire:
Enregistrer un commentaire