SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-05-13 12:55:38

rmcellig
#! Die Hard
From: Ottawa, Canada
Registered: 2012-11-15
Posts: 624
Website

SSH clarification

I set up SSH on my LAN so that I can use rsync to sync some folders. It works great until I reboot one of the machines. It seems as though I have to re-copy the keys to the machine that was rebooted in order for SSH to work again. Is this normal or am I missing something.

These are the steps I take regarding SSH:

install ssh
Sudo apt-get install ssh

generate a secure key
ssh-keygen

copy keygen code to remote destination machine
ssh-copy-id 192.168.2.34

run this on both machines to complete the ssh setup
ssh-add

It seems to work but as mentioned above as long as I don't have to reboot the destination computer..


Cheers Randy
www.mcran.com - my web site
www.chuo.fm - My radio show Sundays  noon-2pm EST or 89.1 fM

Offline

Help fund CrunchBang, donate to the project!

#2 2014-05-13 13:15:31

fratermus
#! CrunchBanger
From: 75081, USA
Registered: 2012-01-20
Posts: 149
Website

Re: SSH clarification

Interesting. 

I'd probably turn on the verbose option to ssh to see if the problem expresses itself.  Failing that, the same for rsync. 

Can you ping the target when ssh fails?  Maybe the network on one or more is failing and gets repaired by the 'boot.


brother mouse
new to crunchbang.
my first linux kernel build was on a 386-16sx with 6MB SIPP RAM ($50/MB!)

Offline

#3 2014-05-13 13:49:07

rmcellig
#! Die Hard
From: Ottawa, Canada
Registered: 2012-11-15
Posts: 624
Website

Re: SSH clarification

I am able to ping no problem. I thought that ssh was designed to survive a system reboot. I know that rsync worked after the target reboot, but only when I used the rsync code in a terminal window. It would not work from cron. It works fine now but next time this happens I will write down exactly what is going on and than post to the forum. The way it is setup now, I love it because it's so fast.

What I am doing is digitizing my vast LP collection on my old Dell 3000 computer using Crunchbang 11. I export the recordings as FLAC files to an external USB drive hanging off my HP dv6 laptop. The files on the USB drive are copied using rsync to another external usb drive hanging off my hp dv2000 laptop and then backed up to the cloud using Crashplan. The reason I keep the USB drives on seperate machines is because I rarely use the dv2000 so it just sits there doing what it needs to do. Crunchbang 11 is used on all three of these computers.

It's also a great learning experience for me as well. The nice thing about saving as FLAC files is that I can pull songs off these files and save them as mp3 files for my weekly radio show.. After 26 years of doing my show, this has opened a new world of possibilities for me. Thanks Linux!! smile


Cheers Randy
www.mcran.com - my web site
www.chuo.fm - My radio show Sundays  noon-2pm EST or 89.1 fM

Offline

#4 2014-05-13 13:57:04

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2012-03-22
Posts: 1,026
Website

Re: SSH clarification

@OP: probably stupid question, but anyway: are your servers (to which you are trying to connect) set up with fixed IP address, or are they using DHCP? For key authentication, server has to have fixed IP address.


Postpone all your duties; if you die, you won't have to do them ..
--> The very new BL forum! <--

Offline

#5 2014-05-13 13:57:38

fratermus
#! CrunchBanger
From: 75081, USA
Registered: 2012-01-20
Posts: 149
Website

Re: SSH clarification

The ssh config will persist across reboots;  a given session will not. 

I love flac for archiving rips from my CDs.   Like you, I encode as needed for a particular usage.


brother mouse
new to crunchbang.
my first linux kernel build was on a 386-16sx with 6MB SIPP RAM ($50/MB!)

Offline

#6 2014-05-13 14:28:34

aiBo
#! CrunchBanger
Registered: 2010-11-08
Posts: 243

Re: SSH clarification

Do you use passhrases or non-default names/locations for your ssh-keys?

Offline

#7 2014-05-13 16:19:33

rmcellig
#! Die Hard
From: Ottawa, Canada
Registered: 2012-11-15
Posts: 624
Website

Re: SSH clarification

aiBo wrote:

Do you use passhrases or non-default names/locations for your ssh-keys?


How would I know?


Cheers Randy
www.mcran.com - my web site
www.chuo.fm - My radio show Sundays  noon-2pm EST or 89.1 fM

Offline

#8 2014-05-14 06:11:06

aiBo
#! CrunchBanger
Registered: 2010-11-08
Posts: 243

Re: SSH clarification

Have you entered a passphrase or different location/name when generating the keys?

Also you mentioned you copy/regenerate the keys after reboot. Are they not present anymore or just not working?

Offline

#9 2014-05-14 10:24:15

rmcellig
#! Die Hard
From: Ottawa, Canada
Registered: 2012-11-15
Posts: 624
Website

Re: SSH clarification

When I type ssh-keygen, I just keep pressing the enter key. Once that is done I do a ssh-copy-id to the destination computer and then test it by for example typing ssh 192.168.2.56. If I get in without a password, I'm OK. That's what I want so that when I use rsync, I don't have to keep typing in a password.

All is working fine now but maybe I should restart the destination computer, and write down what I do to get rsync working again? I'll check my sstab file on the destination machine to make sure the external usb drives are auto mounting on computer restart so I don't have to manually mount them after a computer restart.


Cheers Randy
www.mcran.com - my web site
www.chuo.fm - My radio show Sundays  noon-2pm EST or 89.1 fM

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo