Ssh client
Hi to the community from a real noob :hattip:
I falled in love with Linux's incredible power but facing "some" nobb's issues like this one : Network ssh issue : : Quote:
Error received from machine B trying to connect to machine C (same subnet) : Code:
ssh -vvv admin@192.168.1.1 Including starting ssh user agent on machine B before trying to connect to machine C : Code:
#\ ssh-agent /bin/sh /etc/ssh/ssh_config (machine B) Code:
Host * MachineB: /root/.ssh/id_dsa.pub copied/paste (ctrl+Shift+C as scp is not working) to MachineC: .config/ssh/authorized_keys As it has been done for machine A as well. Checks, tests and assumptions : - checked port 22 reception on machine C (tcpdump and netstat) - purged and reinstalled openssh-client on machine B - tried to restart the process incl key pair generation from scratch) - trying to reconfigure ssh_config (as above). I've done many so I'm lost now... Don't know what to do more. I guess the point is to understand the debug msg from ssh -vvv and adapt the ssh_config file but what shall I do exactly..? |
Hmmm .. seems to be a lot more complicated than it needs to be, personally I'd just do it like this:
- check connectivity between all hosts - enable and start sshd on all hosts - run ssh-copy-id on each host to the other hosts There shouldn't be any reason to muck about with /etc/ssh_config, it should work OOB ... cheers |
Some questions:
What distro are you using? Are you able to ping the machines? Are you able to ssh to localhost? |
Quote:
|
Thks for the answers.
I've checked the network connexions between machines A/B/C, which are ok at least from the ping prospective. Distro are machine A (Ubuntu9.04), Machine B (Debian Lenny) and Machine C (Linux 2.6.24). It's now working as I reinstalled from scratch ssh, openssh-client and opensssh-server on machine B (quite easy with a DEBIAN distro :)). Assumptions : I don't know the reason why it was not working, I've only some assumptions in case it could be a clue for sbdy else: Machine B was running a cronjob to backup some tarballs to machine C but I guess some code lines did corrupt the ssh daemon (due to very bad redirections), Machine B cronjob was also trying to ssh login to machine C, which banned MachineB. Solution applied : Solution I followed (by memory of a love night with my network :doh:): - Restart sshd daemon on machines A and C - then all actions on machine B : - Purge and reinstall ssh, openssh-client and server - check public key chmod (dir 600 and file 644) - check/adapt ssh client configuration /etc/ssh/ssh_config, - reload the new ssh configuration: /etc/init.d/ssh reload - checked that ssh port is listening: netstat -na | grep :_port - checked that ssh process has been started: ps -ef | grep ssh - test ssh connexion to machines A and C: ssh -p port host - generate a pair of dsa keys: ssh-keygen -t -dsa - copy the public key to the ssh host machines A and C into autorized_keys - start ssh-agent and test again ssh connection and remote copy scp Now the point is the following (in fact this was the starting point of all the problems above...): I want to start a cronjob (scp/rsync) from machine B to machine C, but the shell is working "manually" but not as a crontask (it works but not the part with scp/rsync). Despite root is launching the cronjob and files are chmoded accordingly. Problem summary : a- connexion is working and effective but I get a debug msg on Machine B ssh client to connect machine C, when entering the passphrase (it works but) : Quote:
b- How to allow the cronjob to scp/rsync from machine B to machine C, as ssh-agent seems inoperant for this .. ? Difficult ... ! |
Quote:
Code:
PermitRootLogin no |
Very last news :
point a: (debug3: Received SSH2_MSG_IGNORE ) is still a problem not solved. Help is welcome, thx in advance. [EDIT1]: I found a very few informations about this "Error". The main one is that one : Quote:
[EDIT2]: I got the point now: as I started several session as root on machine B from machine A, I guess this debug message appeared in order to prevent from potential hacking. Logged out and then back in, this warning msg disappeared. point b: (starting scp/rsync as cronjob) looks like this problem is due to a ssh-agent limitation as described and solved in this thread so I would expect keychain to be a solution. I'll try that. [EDIT3]: looks to work great for login, cronjob to be tested then... |
Thx Andy, I'll check this: machine C is a kind of special linux distro and accept only root for remote login.
|
All times are GMT -5. The time now is 03:44 AM. |