Re: ssh again

2016-06-19 Thread Lisi Reisz
On Sunday 19 June 2016 22:15:50 Andrew McGlashan wrote:
> On 15/06/2016 12:32 AM, Lisi Reisz wrote:
> > scp /path/to/file username@a:/path/to/destination
>
> use:
>  scp -p source destination
>
> Without -p, you get a new date/timestamp at the very least.  Always a
> good idea(tm) to use -p when copying, even locally.

Thanks, Andrew!  There was I thinking that -p preserved permissions, and that 
the p stood for permissions!  I have looked it up now.  It is obviously 
extremely useful, not to say indispensable.  I had, up to now, only used it 
where I wanted to preserve permissions.

Lisi



Re: ssh again

2016-06-19 Thread Andrew McGlashan
Also consider making an ssh group and limit access in the sshd_config to
that group.

And /etc/hosts.allow /etc/hosts.deny (tcpwrappers).

Not everything in this reference is good for Debian, but most of it is:

http://www.ibm.com/developerworks/aix/library/au-ssh_restrict/index.html


lsgroups?

Cheers
A.



signature.asc
Description: OpenPGP digital signature


Re: ssh again

2016-06-19 Thread Andrew McGlashan


On 15/06/2016 12:32 AM, Lisi Reisz wrote:
> scp /path/to/file username@a:/path/to/destination

use:
 scp -p source destination

Without -p, you get a new date/timestamp at the very least.  Always a
good idea(tm) to use -p when copying, even locally.

Cheers
A.




signature.asc
Description: OpenPGP digital signature


Re: ssh again

2016-06-15 Thread David Wright
On Wed 15 Jun 2016 at 18:46:01 (+), Eduardo M KALINOWSKI wrote:
> On Qua, 15 Jun 2016, Dan Purgert wrote:
> >It is "redundant" in the sense that you move all the way into
> >/home/lisi/pictures/, and then say 'this directory here' (with ./).  BUT
> >as emetib mentions, being an explicit "this directory here" command will
> >ensurethat the system dumps the file(s) into the directory you expect;
> >or fail out in the event that the destination is not a directory (as it
> >would in this case -- pictures are typically stored in
> >"$HOME/*P*ictures".  Remember, capitalization counts).
> 
> OK, but wouldn't /home/user/Pictures/ (note trailing slash) also
> fail in case there isn't a directory Pictures or it's a file? What
> does "/./" add that "/" doesn't do?

I agree; it's a waste of typing.

> >Without the "/./" characters, if you were using something like "scp
> >/path/to/files/*.jpg user@host:/home/user/destination" and "destination"
> >was not already a directory, the system would happily copy every file
> >over the previous one (naming each one 'destination').
> 
> I can't tell what scp does in this case (and can't try right now),
> but regular cp fails with a message saying that 'destination' is not
> a directory. I'd imagine scp does something similar.

That is my experience. But the trailing / is always worthwhile,
if only for the case in which you type, say:

scp -p /path/to/files/*.jpg user@host:/home/user/destination

(where you've forgotten that destination is actually a file)
and *.jpg, unluckily for you, happens to match just one file.
Now you're in trouble.

Cheers,
David.



Re: ssh again

2016-06-15 Thread Eduardo M KALINOWSKI

On Qua, 15 Jun 2016, Dan Purgert wrote:

It is "redundant" in the sense that you move all the way into
/home/lisi/pictures/, and then say 'this directory here' (with ./).  BUT
as emetib mentions, being an explicit "this directory here" command will
ensurethat the system dumps the file(s) into the directory you expect;
or fail out in the event that the destination is not a directory (as it
would in this case -- pictures are typically stored in
"$HOME/*P*ictures".  Remember, capitalization counts).


OK, but wouldn't /home/user/Pictures/ (note trailing slash) also fail  
in case there isn't a directory Pictures or it's a file? What does  
"/./" add that "/" doesn't do?



Without the "/./" characters, if you were using something like "scp
/path/to/files/*.jpg user@host:/home/user/destination" and "destination"
was not already a directory, the system would happily copy every file
over the previous one (naming each one 'destination').


I can't tell what scp does in this case (and can't try right now), but  
regular cp fails with a message saying that 'destination' is not a  
directory. I'd imagine scp does something similar.

--
Eduardo M KALINOWSKI
edua...@kalinowski.com.br




Re: ssh again

2016-06-15 Thread Dan Purgert
Leon.37428 wrote:
> On 06/15/2016 10:00 AM, emetib wrote:
>> jorg wrote- 
>>
>> Better command
>>
>>   scp /home/whatever/file.jpg remote@hostname:/home/user/Pictures/ 
>> ---
>>
>> one thing that i've learned is that you should get in the habit when
>> cping or mving is to add a ./ when copying, moving into a directory.
>> 
>>
>> i.e.
>> cp /home/lisi/downloads/whatever.jpg /home/lisi/pictures/./
>>
>> all that means is basically this directory.  like the ../ meaning the
>> directory one up.  Once you get into the habit of doing it you'll
>> thank yourself especially once you start to get into funky namings of
>> dirs that some people do on their computers.
>>
>> especially once you start spanning miles instead of rooms.
>>
>> take care
>> em
>>
>
> While I am taking note of this, what kind of problems does that
> /seemingly/ redundant command do that differs from the above one?

It is "redundant" in the sense that you move all the way into
/home/lisi/pictures/, and then say 'this directory here' (with ./).  BUT
as emetib mentions, being an explicit "this directory here" command will
ensurethat the system dumps the file(s) into the directory you expect;
or fail out in the event that the destination is not a directory (as it
would in this case -- pictures are typically stored in
"$HOME/*P*ictures".  Remember, capitalization counts).

Without the "/./" characters, if you were using something like "scp
/path/to/files/*.jpg user@host:/home/user/destination" and "destination"
was not already a directory, the system would happily copy every file
over the previous one (naming each one 'destination').

HTH

-- 
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| 



Re: ssh again

2016-06-15 Thread Leon.37428
On 06/15/2016 10:00 AM, emetib wrote:
> jorg wrote- 
>
> Better command
>
>   scp /home/whatever/file.jpg remote@hostname:/home/user/Pictures/ 
> ---
>
> one thing that i've learned is that you should get in the habit when cping or 
> mving is to add a ./ when copying, moving into a directory. 
>
> i.e.
> cp /home/lisi/downloads/whatever.jpg /home/lisi/pictures/./
>
> all that means is basically this directory.  like the ../ meaning the 
> directory one up.  
> once you get into the habit of doing it you'll thank yourself especially once 
> you start to get into funky namings of dirs that some people do on their 
> computers.
>
> especially once you start spanning miles instead of rooms.
>
> take care
> em
>

While I am taking note of this, what kind of problems does that
/seemingly/ redundant command do that differs from the above one?

- Leon



Re: ssh again

2016-06-15 Thread emetib
jorg wrote- 

Better command

  scp /home/whatever/file.jpg remote@hostname:/home/user/Pictures/ 
---

one thing that i've learned is that you should get in the habit when cping or 
mving is to add a ./ when copying, moving into a directory. 

i.e.
cp /home/lisi/downloads/whatever.jpg /home/lisi/pictures/./

all that means is basically this directory.  like the ../ meaning the directory 
one up.  
once you get into the habit of doing it you'll thank yourself especially once 
you start to get into funky namings of dirs that some people do on their 
computers.

especially once you start spanning miles instead of rooms.

take care
em



Re: Fwd: ssh again

2016-06-15 Thread David Wright
On Wed 15 Jun 2016 at 11:13:26 (+0200), Jörg-Volker Peetz wrote:
> Leon.37428 wrote on 06/14/16 19:28:
> 
> > With scp if you plan on using the same file-name, you don't need to
> > specify it on the other end. You can simply go right ahead and just type:
> > 
> > scp /home/whatever/file.jpg remote@hostname:"/home/user/Pictures"
> > 
> 
> Better command
> 
>   scp /home/whatever/file.jpg remote@hostname:/home/user/Pictures/
> 
> because with the ending "/" you state you intend to copy to a directory. If it
> doesn't exist you get an error message. Without the "/" at the end of the 
> remote
> path you would rename your file and could even overwrite an existing file name
> "Pictures".

Agreed: and there's no -i (as in cp and mv) to protect you from overwriting.

I always specify -p otherwise the modification date gets changed even
though you've not modified the file.

Also useful is -r:

  scp -pr /home/whatever/ remote@hostname:/home/user/Pictures/

copies everything under whatever/ into the remote directory specified.

Cheers,
David.



Re: ssh again

2016-06-15 Thread Dan Purgert
Lars Noodén wrote:
> On 06/15/2016 02:54 AM, emetib wrote:
> [snip]
>> dan has a good point about having your own nameserver.  yet with only
>> three computers in your home network it's not necessarily needed.
>> 
>> wait i did that before.
>> 
>> they are easy to set up and
> [snip]
>
> Even easier is dnsmasq.  It has both DHCP and some DNS.  It is very easy
> to set up and very useful for small and, probably medium, networks.  It
> will allow hosts on the LAN to get specific names if the hosts identify
> themselves with the same MAC address each time.  Many routers have it
> built-in like openwrt, lede, and dd-wrt

dnsmasq "works" ... but it's kind of a pain, IMO.  Then again, it might
be because I cut my teeth on isc-dhcp-server / bind.

-- 
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| 



Re: ssh again

2016-06-15 Thread Dan Purgert
emetib wrote:
> [snip]
> dan has a good point about having your own nameserver.  yet with only
> three computers in your home network it's not necessarily needed.  

Not "necessary", no -- but it's really helpful.  In my case, I've only
got a handful of "PCs" running, but since they move around regularly
enough (home to coffee shop, etc.), DHCP is a must ... and setting hosts
files can break things in interesting ways.

Not to mention the TV, media center, etc.  It's a lot easier to remember
"raspi-{0..2}.djph.net" to connect to the media players (0=basement,
1=ground floor, 2=2nd floor) from our phones than trying to remember the
IP address (XBMC / Kodi has a web based remote, instead of adding pieces
/ setting up the raspi to work with a standard IR remote).

>
>
> they are easy to set up and if you do have a POS sitting around
> getting dusty then it's something to play with.  you could do an
> ntp-server on it also for your private network.
>
> or just use a little used machine that is already on the network, or
> the most powerful one, it's up to you.

+1 for NTP.  Some ancient P4 with a gig or less of RAM and a 20G HDD is
more than sufficient to run DNS / NTP / DHCP (and some other things as
well).

>
> both are easy to set up and you don't need to open up ports on your
> firewall since they are getting response packets. and it helps with
> the knowledge curve when you start to play with the dhcp and/or static
> addresses.  maybe plug a wireless card into a pci slot and make your
> own wireless network

TBH, if you want to add wifi to the mix, you'd do better with a separate
access point nearer to where you're actually going to use it -- for
example, in your home theater -- rather than where ever your "server"
box or incoming internet connection is.

-- 
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| 



Re: Fwd: ssh again

2016-06-15 Thread Lisi Reisz
On Wednesday 15 June 2016 10:13:26 Jörg-Volker Peetz wrote:
> Leon.37428 wrote on 06/14/16 19:28:
> 
>
> > With scp if you plan on using the same file-name, you don't need to
> > specify it on the other end. You can simply go right ahead and just type:
> >
> > scp /home/whatever/file.jpg remote@hostname:"/home/user/Pictures"
>
> Better command
>
>   scp /home/whatever/file.jpg remote@hostname:/home/user/Pictures/
>
> because with the ending "/" you state you intend to copy to a directory. If
> it doesn't exist you get an error message. Without the "/" at the end of
> the remote path you would rename your file and could even overwrite an
> existing file name "Pictures".

That explains one of the error messages I got!  Thank you, Jörg-Volker.

Thanks again to all, for all the help and ideas,
Lisi



Re: Fwd: ssh again

2016-06-15 Thread Jörg-Volker Peetz
Leon.37428 wrote on 06/14/16 19:28:

> With scp if you plan on using the same file-name, you don't need to
> specify it on the other end. You can simply go right ahead and just type:
> 
> scp /home/whatever/file.jpg remote@hostname:"/home/user/Pictures"
> 

Better command

  scp /home/whatever/file.jpg remote@hostname:/home/user/Pictures/

because with the ending "/" you state you intend to copy to a directory. If it
doesn't exist you get an error message. Without the "/" at the end of the remote
path you would rename your file and could even overwrite an existing file name
"Pictures".

Regards,
jvp.




Re: ssh again

2016-06-15 Thread Jörg-Volker Peetz
Lisi Reisz wrote on 06/14/16 21:19:

> But I can see that changing IPs around could be a pain - I have several 
> machines that have two network cards for one reason or another, and I have 
> assigned different IPs to different cards in the router.
> 
Some modern router models supply a built-in dns server and even facilitate
configuration of host names for devices in the home network.

Regards,
jvp.




Re: ssh again

2016-06-14 Thread Lars Noodén
On 06/15/2016 02:54 AM, emetib wrote:
[snip]
> dan has a good point about having your own nameserver.  yet with only
> three computers in your home network it's not necessarily needed.
> 
> wait i did that before.
> 
> they are easy to set up and
[snip]

Even easier is dnsmasq.  It has both DHCP and some DNS.  It is very easy
to set up and very useful for small and, probably medium, networks.  It
will allow hosts on the LAN to get specific names if the hosts identify
themselves with the same MAC address each time.  Many routers have it
built-in like openwrt, lede, and dd-wrt

For the remote routers, it's still a matter of either choosing a dynamic
DNS service (which is also commonly supported by routers) or else taking
advantage of the one static IP and having the others phone home in some
way, shape, or form.

Regards,
Lars



Re: ssh again

2016-06-14 Thread emetib
On Tuesday, June 14, 2016 at 5:00:09 PM UTC-5, Dan Purgert wrote:
> Lisi Reisz wrote:
> > On Tuesday 14 June 2016 18:08:45 Brian wrote:
> >> With avahi-daemon installed on both machines
> >>
> >>   ssh hostname.local
> >>
> >> should just work. No messing with config files or anything like that.
> >>
> >> /etc/hosts is fine if you are more comfortable with it but an IP address
> >> changing can make it a pain on the local LAN.
> >
> > Works a dream!!  Thank you, Brian.  That was a remarkably easy lesson!  I 
> > might set a hosts file up as I was shown by emetib.  It doesn't hurt
> > to know both, and I might some time want to ssh into a machine that
> > hasn't got avahi-daemon installed. 
> >
> > But I can see that changing IPs around could be a pain - I have several 
> > machines that have two network cards for one reason or another, and I
> > have assigned different IPs to different cards in the router.
> 
> This is a little more "involved" than /etc/hosts or ahavi-daemon, but
> you might consider isc-dhcp-server and bind9 on a box you designate as
> "your server" (I have it on a spare desktop sitting in the corner).
> 
> That way,
> 
>  - you don't have to mess with /etc/hosts as things change (e.g. got a
>new computer)
>  - you don't have to worry about "oh, that one doesn't have
>ahavi-daemon"
>  - you can use hostnames with networked device, including those things
>that may not have hostfiles or a decent bonjour client (phones,
>tablets, TVs, etc.)
>  - Other stuff I'm forgetting :)
>  - When you replace your router (or get a forced 'upgrade' from your
>ISP), you don't have to deal with "fixing things" beyond the router
>itself.
> 
> -- 
> |_|O|_| Registered Linux user #585947
> |_|_|O| Github: https://github.com/dpurgert
> |O|O|O|

dan has a good point about having your own nameserver.  yet with only three 
computers in your home network it's not necessarily needed.  

wait i did that before.

they are easy to set up and if you do have a POS sitting around getting dusty 
then it's something to play with.  you could do an ntp-server on it also for 
your private network.

or just use a little used machine that is already on the network, or the most 
powerful one, it's up to you.

both are easy to set up and you don't need to open up ports on your firewall 
since they are getting response packets. and it helps with the knowledge curve 
when you start to play with the dhcp and/or static addresses.  maybe plug a 
wireless card into a pci slot and make your own wireless network.

take care
em



Re: ssh again

2016-06-14 Thread Dan Purgert
Lisi Reisz wrote:
> On Tuesday 14 June 2016 18:08:45 Brian wrote:
>> With avahi-daemon installed on both machines
>>
>>   ssh hostname.local
>>
>> should just work. No messing with config files or anything like that.
>>
>> /etc/hosts is fine if you are more comfortable with it but an IP address
>> changing can make it a pain on the local LAN.
>
> Works a dream!!  Thank you, Brian.  That was a remarkably easy lesson!  I 
> might set a hosts file up as I was shown by emetib.  It doesn't hurt
> to know both, and I might some time want to ssh into a machine that
> hasn't got avahi-daemon installed. 
>
> But I can see that changing IPs around could be a pain - I have several 
> machines that have two network cards for one reason or another, and I
> have assigned different IPs to different cards in the router.

This is a little more "involved" than /etc/hosts or ahavi-daemon, but
you might consider isc-dhcp-server and bind9 on a box you designate as
"your server" (I have it on a spare desktop sitting in the corner).

That way,

 - you don't have to mess with /etc/hosts as things change (e.g. got a
   new computer)
 - you don't have to worry about "oh, that one doesn't have
   ahavi-daemon"
 - you can use hostnames with networked device, including those things
   that may not have hostfiles or a decent bonjour client (phones,
   tablets, TVs, etc.)
 - Other stuff I'm forgetting :)
 - When you replace your router (or get a forced 'upgrade' from your
   ISP), you don't have to deal with "fixing things" beyond the router
   itself.

-- 
|_|O|_| Registered Linux user #585947
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| 



Re: ssh again

2016-06-14 Thread David Christensen

On 06/14/2016 07:32 AM, Lisi Reisz wrote:

... I am now trying to copy files aroind.
... scp /path/to/file username@a:/path/to/destination
.. host names,
... ssh into two computers that I administer 11 miles away,
...  their ISP uses dynamic


I use scp if I'm copying files for the first time -- e.g. nothing on the 
destination end.  After that, I use rsync.



It's easiest if there is one read-write copy of the files/ directories/ 
file system (source, master) and all the other copies are read-only 
(backup, slave, snapshots).  Keeping N read-write file systems 
synchronized is  a non-trivial problem.



Many programs (including rsync) depend upon the clock being set 
correctly.  I strive to install an ntp service on every machine I use.



There are a great number of choices and technologies available for 
connecting computers into networks.



While you can build your own LAN infrastructure machines from scratch 
using Debian (DHCP, DNS, firewall, NAT, etc.), it can be better, faster, 
cheaper to use a good FOSS firewall/ router appliance distribution:


http://www.ipcop.org/

https://www.pfsense.org/

https://openwrt.org/


When you're ready to connect multiple LAN's over the Internet (OpenVPN), 
you will need a DDNS server.  Again, you can roll your own or you can 
find a productized solution (at least one other poster suggested some 
DDNS providers).  You will need to coordinate your choice of DDNS 
service with your choice of router.  It's nice to have your own domain name.



David



Re: ssh again

2016-06-14 Thread Lisi Reisz
On Tuesday 14 June 2016 18:08:45 Brian wrote:
> On Tue 14 Jun 2016 at 16:06:17 +0100, Lisi Reisz wrote:
> > On Tuesday 14 June 2016 15:53:17 Mark Fletcher wrote:
> > > On Tue, Jun 14, 2016 at 11:48 PM Lisi Reisz  
wrote:
> > > > On Tuesday 14 June 2016 15:40:22 Reco wrote:
> > > > >   Hi.
> > > > >
> > > > > On Tue, Jun 14, 2016 at 03:32:19PM +0100, Lisi Reisz wrote:
> > > >
> > > > Hostnames, here I come.
> > > >
> > > > For hostnames within your own network, consider installing avahi.
> >
> > Thanks, Mark.  I have.  After the earlier hints.  I just haven't got it
> > working yet. :-(  So I shall look at both it and having hostnames files
> > to see which I can actually succeed with.
>
> With avahi-daemon installed on both machines
>
>   ssh hostname.local
>
> should just work. No messing with config files or anything like that.
>
> /etc/hosts is fine if you are more comfortable with it but an IP address
> changing can make it a pain on the local LAN.

Works a dream!!  Thank you, Brian.  That was a remarkably easy lesson!  I 
might set a hosts file up as I was shown by emetib.  It doesn't hurt to know 
both, and I might some time want to ssh into a machine that hasn't got 
avahi-daemon installed.  

But I can see that changing IPs around could be a pain - I have several 
machines that have two network cards for one reason or another, and I have 
assigned different IPs to different cards in the router.

Lisi



Re: ssh again

2016-06-14 Thread Joe
On Tue, 14 Jun 2016 19:23:23 +0200
Jörg-Volker Peetz  wrote:

> Lisi Reisz wrote on 06/14/16 16:32:
> 
> > After all this, my main motivation for learning right now was to
> > ssh into two computers that I administer 11 miles away, without
> > having to bother the owners (I would just have to say: leave your
> > computers turned on), and I'm not going to be able to do it, I
> > think, because their ISP uses dynamic IPs. :-(  (I have a static
> > IP.)  
> 
> That's where Dynamic DNS comes to aid, see
> https://en.wikipedia.org/wiki/Dynamic_DNS . Just choose a free DynDNS
> provider, like no-ip, and a web-hostname.
> 

Or for a bit of bash practice, you can do it yourself. A couple of years
ago, I needed to track a dynamic IP for a couple of months, until a
fixed one was organised. I ran this on the client's Linux server with a
cron job once an hour:

wget -qO- http://ipecho.net/plain | /usr/bin/mutt -s "IP report"
j...@jretrading.com

I did actually get a bit creative later, and automated the moving of
the address from the latest email into my workstation's /etc/hosts
file, but I made use of a web server, which you may not have in your own
network, and my IMAP processing script was in php. A semi-automatic
method would be to save the latest email as a text file, and run a bash
script to pick out the address and poke it into the local /etc/hosts.

-- 
Joe



Re: Fwd: ssh again

2016-06-14 Thread Leon.37428
On 06/14/2016 01:06 PM, Andrew M.A. Cater wrote:
> On Tue, Jun 14, 2016 at 03:37:47PM +0100, Lisi Reisz wrote:
>> Here is a repeat of my earlier failed attempt.
>>
>> peter@Nyx-II:~/Lisi$ scp /home/peter/Pictures/Winter\ Dream\ II.jpg 
>> lisi@192.168.0.2:/home/lisi/Pictures?Winter\ Dream\ II.jpg
>> lisi@192.168.0.2's password:
>> scp: ambiguous target
>> peter@Nyx-II:~/Lisi$
>>
>> This was the method that had worked from .2 to .3.  (Logged into .3 from .2, 
>> copied from .2 to .3 - that's how that picture got there!!)
>>
>> Lisi
>>
>> --  Forwarded Message  --
>>
>
> Watch your slashes :)
>
> scp /ome/peter/Pictures/Winter\ Dream\ II.jpg 
> lisi@192/168.0.2:/home/lisi/Pictures/Winter\ Dream\ II.jpg
>
> to be honest, I'd be tempted to make a copy of the picture as 
> Winterdream2.jpg - that way you don't have to escape 
> spaces with the backslash
>
> HTH,
>
> AndyC
>
With scp if you plan on using the same file-name, you don't need to
specify it on the other end. You can simply go right ahead and just type:

scp /home/whatever/file.jpg remote@hostname:"/home/user/Pictures"


- Leon



Re: ssh again

2016-06-14 Thread Jörg-Volker Peetz
Lisi Reisz wrote on 06/14/16 16:32:

> After all this, my main motivation for learning right now was to ssh into two 
> computers that I administer 11 miles away, without having to bother the 
> owners (I would just have to say: leave your computers turned on), and I'm 
> not going to be able to do it, I think, because their ISP uses dynamic 
> IPs. :-(  (I have a static IP.)

That's where Dynamic DNS comes to aid, see
https://en.wikipedia.org/wiki/Dynamic_DNS . Just choose a free DynDNS provider,
like no-ip, and a web-hostname.

Regards,
jvp.




Re: ssh again

2016-06-14 Thread Brian
On Tue 14 Jun 2016 at 16:06:17 +0100, Lisi Reisz wrote:

> On Tuesday 14 June 2016 15:53:17 Mark Fletcher wrote:
> > On Tue, Jun 14, 2016 at 11:48 PM Lisi Reisz  wrote:
> > > On Tuesday 14 June 2016 15:40:22 Reco wrote:
> > > >   Hi.
> > > >
> > > > On Tue, Jun 14, 2016 at 03:32:19PM +0100, Lisi Reisz wrote:
> > >
> > > Hostnames, here I come.
> > >
> > > For hostnames within your own network, consider installing avahi.
> 
> Thanks, Mark.  I have.  After the earlier hints.  I just haven't got it 
> working yet. :-(  So I shall look at both it and having hostnames files to 
> see which I can actually succeed with.

With avahi-daemon installed on both machines

  ssh hostname.local

should just work. No messing with config files or anything like that.

/etc/hosts is fine if you are more comfortable with it but an IP address
changing can make it a pain on the local LAN.



Re: Fwd: ssh again

2016-06-14 Thread Andrew M.A. Cater
On Tue, Jun 14, 2016 at 03:37:47PM +0100, Lisi Reisz wrote:
> Here is a repeat of my earlier failed attempt.
> 
> peter@Nyx-II:~/Lisi$ scp /home/peter/Pictures/Winter\ Dream\ II.jpg 
> lisi@192.168.0.2:/home/lisi/Pictures?Winter\ Dream\ II.jpg
> lisi@192.168.0.2's password:
> scp: ambiguous target
> peter@Nyx-II:~/Lisi$
> 
> This was the method that had worked from .2 to .3.  (Logged into .3 from .2, 
> copied from .2 to .3 - that's how that picture got there!!)
> 
> Lisi
> 
> --  Forwarded Message  --
> 


Watch your slashes :)

scp /ome/peter/Pictures/Winter\ Dream\ II.jpg 
lisi@192/168.0.2:/home/lisi/Pictures/Winter\ Dream\ II.jpg

to be honest, I'd be tempted to make a copy of the picture as Winterdream2.jpg 
- that way you don't have to escape 
spaces with the backslash

HTH,

AndyC



Re: ssh again

2016-06-14 Thread Lisi Reisz
On Tuesday 14 June 2016 16:32:45 emetib wrote:
> > That's my project after next - if I live that long!!! ;-)  Probably a
> > quick way of getting rid of the rest of my hair.  And/or turning it grey.
> >
> > Lisi
>
> lisi,
>
> hopefully this is to the list and not private.

:-))  It was. :-)
>
> for your home network -
>
> /etc/hosts
> add the ipaddress followed by the hostname
>
> i.e.
> 127.0.0.1 localhost
> 127.0.1.1 hestia
>
> 192.168.122.10testing
> 192.168.122.11stable
> 192.168.122.12one-i386
>
> that will make ssh user@hostname work instead of user@ipaddress.  also
> works with scp and sftp
>
> take care

Thank you very much!!

Lisi



Re: ssh again

2016-06-14 Thread emetib

> 
> Lisi

for you home network use /etc/hosts
i.e
127.0.0.1   localhost
127.0.1.1   hestia

192.168.122.10  testing
192.168.122.11  stable
192.168.122.12  one-i386

this will make it so you can ssh user@hostname instead of ssh user@ipaddress.
this works with scp and sftp also.

take care



Re: ssh again

2016-06-14 Thread emetib

> That's my project after next - if I live that long!!! ;-)  Probably a quick 
> way of getting rid of the rest of my hair.  And/or turning it grey.
> 
> Lisi

lisi, 

hopefully this is to the list and not private.

for your home network -

/etc/hosts
add the ipaddress followed by the hostname

i.e.
127.0.0.1   localhost
127.0.1.1   hestia

192.168.122.10  testing
192.168.122.11  stable
192.168.122.12  one-i386

that will make ssh user@hostname work instead of user@ipaddress.  also works 
with scp and sftp

take care



Re: ssh again

2016-06-14 Thread Lisi Reisz
On Tuesday 14 June 2016 15:53:17 Mark Fletcher wrote:
> On Tue, Jun 14, 2016 at 11:48 PM Lisi Reisz  wrote:
> > On Tuesday 14 June 2016 15:40:22 Reco wrote:
> > >   Hi.
> > >
> > > On Tue, Jun 14, 2016 at 03:32:19PM +0100, Lisi Reisz wrote:
> >
> > Hostnames, here I come.
> >
> > For hostnames within your own network, consider installing avahi.

Thanks, Mark.  I have.  After the earlier hints.  I just haven't got it 
working yet. :-(  So I shall look at both it and having hostnames files to 
see which I can actually succeed with.

> > That's 
>
> how I got it working on an LFS system I built recently where _nothing_
> worked until I built / installed / configured it myself. The process of
> getting that machine to a useful state taught me a lot, not least an
> appreciation for everything that "just works" with Debian!

That's my project after next - if I live that long!!! ;-)  Probably a quick 
way of getting rid of the rest of my hair.  And/or turning it grey.

Lisi



Re: ssh again

2016-06-14 Thread Lisi Reisz
On Tuesday 14 June 2016 15:42:17 Lars Noodén wrote:
> On 06/14/2016 05:32 PM, Lisi Reisz wrote:
> > peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg Lisi@192.168.0.2:~/Pictures/
> > cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/’: No such
> > file or directory
> > peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg
> > Lisi@192.168.0.2:~/Pictures/Ken-Blue-test
> > cp: cannot create regular file
> > ‘Lisi@192.168.0.2:~/Pictures/Ken-Blue-test’: No such file or directory
> > peter@Nyx-II:~/Lisi$
>
> There's a typo there.  It should be scp rather than cp, to get from one
> machine to the other.  You might consider using sftp since that tool
> gives more to work with.
>
> About the dynamic ip numbers, there are several ways to solve that.  One
> is to get them an account with a dynamic DNS service.  There are some
> free, with conditions, there are some that cost, and there are some
> regular registrars that even offer it as part of their regular service.

Thank you, Lars.  That was an error, not a typo.  Now corrected.  I'll 
certainly look at sftp.

Thanks for the tip re IPs.  That has cheered me up!!  The distance is becoming 
more of a problem, and finding them a replacement for myself is tricky to say 
the least. 

Lisi



Re: ssh again

2016-06-14 Thread Mark Fletcher
On Tue, Jun 14, 2016 at 11:48 PM Lisi Reisz  wrote:

> On Tuesday 14 June 2016 15:40:22 Reco wrote:
> >   Hi.
> >
> > On Tue, Jun 14, 2016 at 03:32:19PM +0100, Lisi Reisz wrote:
> Hostnames, here I come.
>
> For hostnames within your own network, consider installing avahi. That's
how I got it working on an LFS system I built recently where _nothing_
worked until I built / installed / configured it myself. The process of
getting that machine to a useful state taught me a lot, not least an
appreciation for everything that "just works" with Debian!

Mark


Re: ssh again

2016-06-14 Thread Lisi Reisz
On Tuesday 14 June 2016 15:40:22 Reco wrote:
>   Hi.
>
> On Tue, Jun 14, 2016 at 03:32:19PM +0100, Lisi Reisz wrote:
> > peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg Lisi@192.168.0.2:~/Pictures/
> > cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/’: No such
> > file or directory
> > peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg
> > Lisi@192.168.0.2:~/Pictures/Ken-Blue-test
> > cp: cannot create regular file
> > ‘Lisi@192.168.0.2:~/Pictures/Ken-Blue-test’: No such file or directory
>
> Use 'scp', not 'cp'.
>
> Reco

AND use the correct user-name!!!

Thank you so much Reco.  That worked. \o/

Hostnames, here I come.

Lisi



Re: ssh again

2016-06-14 Thread Lars Noodén
On 06/14/2016 05:32 PM, Lisi Reisz wrote:
> peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg Lisi@192.168.0.2:~/Pictures/
> cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/’: No such file 
> or 
> directory
> peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg 
> Lisi@192.168.0.2:~/Pictures/Ken-Blue-test
> cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/Ken-Blue-test’: 
> No 
> such file or directory
> peter@Nyx-II:~/Lisi$

There's a typo there.  It should be scp rather than cp, to get from one
machine to the other.  You might consider using sftp since that tool
gives more to work with.

About the dynamic ip numbers, there are several ways to solve that.  One
is to get them an account with a dynamic DNS service.  There are some
free, with conditions, there are some that cost, and there are some
regular registrars that even offer it as part of their regular service.

Regards,
Lars



Re: ssh again

2016-06-14 Thread Reco
Hi.

On Tue, Jun 14, 2016 at 03:32:19PM +0100, Lisi Reisz wrote:
> peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg Lisi@192.168.0.2:~/Pictures/
> cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/’: No such file 
> or 
> directory
> peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg 
> Lisi@192.168.0.2:~/Pictures/Ken-Blue-test
> cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/Ken-Blue-test’: 
> No 
> such file or directory

Use 'scp', not 'cp'.

Reco



Fwd: ssh again

2016-06-14 Thread Lisi Reisz
Here is a repeat of my earlier failed attempt.

peter@Nyx-II:~/Lisi$ scp /home/peter/Pictures/Winter\ Dream\ II.jpg 
lisi@192.168.0.2:/home/lisi/Pictures?Winter\ Dream\ II.jpg
lisi@192.168.0.2's password:
scp: ambiguous target
peter@Nyx-II:~/Lisi$

This was the method that had worked from .2 to .3.  (Logged into .3 from .2, 
copied from .2 to .3 - that's how that picture got there!!)

Lisi

--  Forwarded Message  --

Subject: ssh again
Date: Tuesday 14 June 2016, 15:32:19
From: Lisi Reisz <lisi.re...@gmail.com>
To: debian-user@lists.debian.org

Having got ssh working reliably oevr my home network, tahnks ot teh opatient 
help of thsi list, I am now trying to copy files aroind.  I am on 
192.168.0.2, but have sshed in to 192.268.0.3 (I must get hostnames 
working :-(  ).

The other day I successfully ciopied a pictiyure from .2 to .3, and now I am 
tring to copy from .3 to .2.  I have been usinmg this:
"To copy a file from B to A while logged into B:

scp /path/to/file username@a:/path/to/destination
"
http://unix.stackexchange.com/questions/106480/how-to-copy-files-from-one-machine-to-another-using-ssh

Here is what I have done (all of it, in case something I deem irrelevant is 
the crux of the matter)):
---
lisi@Tux-II:~$ ssh peter@192.168.0.3
peter@192.168.0.3's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Jun 14 15:17:05 2016
peter@Nyx-II:~$ cd Lisi/
peter@Nyx-II:~/Lisi$ ls
Council-tax-bill   Packages-installed-on-Tux-II
Drug-order_13-08-26.odtP-passport
file2ssXvS.xlsxtax-info
grub-warnings-when-updating-to-7.2 tax-info_81-purchase
Ken-Blue-10.jpgTheSecretsOfStationX
libflashplayer.so.odt  Tux-II_sources.list
L-passport.pdf watch
L-passport.png watch-colour
Mass-of-Christ-the-King_singing-order.odt  Wireless-tests.odt
Nyx-hardware-address.odt
peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg Lisi@192.168.0.2:~/Pictures/
cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/’: No such file or 
directory
peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg 
Lisi@192.168.0.2:~/Pictures/Ken-Blue-test
cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/Ken-Blue-test’: No 
such file or directory
peter@Nyx-II:~/Lisi$
---

Once I have one file copied, I shall divert back to square one and sort out 
host names, starting with the hints I have already been given.  I can't keep 
using full IPs!

After all this, my main motivation for learning right now was to ssh into two 
computers that I administer 11 miles away, without having to bother the 
owners (I would just have to say: leave your computers turned on), and I'm 
not going to be able to do it, I think, because their ISP uses dynamic 
IPs. :-(  (I have a static IP.)

Lisi


---



ssh again

2016-06-14 Thread Lisi Reisz
Having got ssh working reliably oevr my home network, tahnks ot teh opatient 
help of thsi list, I am now trying to copy files aroind.  I am on 
192.168.0.2, but have sshed in to 192.268.0.3 (I must get hostnames 
working :-(  ).

The other day I successfully ciopied a pictiyure from .2 to .3, and now I am 
tring to copy from .3 to .2.  I have been usinmg this:
"To copy a file from B to A while logged into B:

scp /path/to/file username@a:/path/to/destination
"
http://unix.stackexchange.com/questions/106480/how-to-copy-files-from-one-machine-to-another-using-ssh

Here is what I have done (all of it, in case something I deem irrelevant is 
the crux of the matter)):
---
lisi@Tux-II:~$ ssh peter@192.168.0.3
peter@192.168.0.3's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Jun 14 15:17:05 2016
peter@Nyx-II:~$ cd Lisi/
peter@Nyx-II:~/Lisi$ ls
Council-tax-bill   Packages-installed-on-Tux-II
Drug-order_13-08-26.odtP-passport
file2ssXvS.xlsxtax-info
grub-warnings-when-updating-to-7.2 tax-info_81-purchase
Ken-Blue-10.jpgTheSecretsOfStationX
libflashplayer.so.odt  Tux-II_sources.list
L-passport.pdf watch
L-passport.png watch-colour
Mass-of-Christ-the-King_singing-order.odt  Wireless-tests.odt
Nyx-hardware-address.odt
peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg Lisi@192.168.0.2:~/Pictures/
cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/’: No such file or 
directory
peter@Nyx-II:~/Lisi$ cp Ken-Blue-10.jpg 
Lisi@192.168.0.2:~/Pictures/Ken-Blue-test
cp: cannot create regular file ‘Lisi@192.168.0.2:~/Pictures/Ken-Blue-test’: No 
such file or directory
peter@Nyx-II:~/Lisi$
---

Once I have one file copied, I shall divert back to square one and sort out 
host names, starting with the hints I have already been given.  I can't keep 
using full IPs!

After all this, my main motivation for learning right now was to ssh into two 
computers that I administer 11 miles away, without having to bother the 
owners (I would just have to say: leave your computers turned on), and I'm 
not going to be able to do it, I think, because their ISP uses dynamic 
IPs. :-(  (I have a static IP.)

Lisi



Re: SSH again!

2000-06-16 Thread Timothy C. Phan
Hi all,

  Thanks for all the replies.  I believed that I got it to
  work somehow.  Need to redo the steps again to make sure.

  Still, do not quite understand how all this work:

1.  Can one steal/copy the *.pub keys and use it to logon?
2.  It seemed to me that if I do not remember/supply the
correct passphrase when run ssh, it would still 
allow me to log on using the regular account/password.
3.  Even if I do not have the *.pub keys and I could still
log on the server via the regular login/password!

  I thought that if not public key were given to the client,
  the client shall not be able to log on regardless whether
  the client has or does not have the regular login/password.
  Otherwise, what is the point of having the key or not having
  the key?

  Last, how do I generate the key from a windows/nt machine?
  I'm trying to login from an windows / nt as well.  Thanks!


Bob Nielsen wrote:
 
 On Thu, Jun 15, 2000 at 08:41:01AM -0500, Nathan E Norman wrote:
  On Wed, Jun 14, 2000 at 04:23:38PM -0700, Bob Nielsen wrote:
 
   Most of the systems on which I have set up a .ssh/authorized_keys file
   require only the key.  One requires the password instead, although the
   key file is correct as far as I can tell.
 
  It's worth noting that ssh cares about file permissions; it seems to
  get upset if your key files are group writable.  Remove group write
  permissions and see what happens.
 
 The permissions for .ssh/authorized_keys on both boxes (both running
 slink) are: -rw-r--r--
 
 The two files are identical, as well.
 
 --
 Bob Nielsen, N7XY  (RN2)   [EMAIL PROTECTED]
 Bainbridge Island, WA  http://www.oz.net/~nielsen
 
 
 --
 Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null



Re: SSH again!

2000-06-15 Thread Nathan E Norman
On Wed, Jun 14, 2000 at 04:23:38PM -0700, Bob Nielsen wrote:
 On Wed, Jun 14, 2000 at 04:45:10PM -0500, Timothy C. Phan wrote:
  Hi all,
  
Don't I suppose to get two prompts for two passwords?
One from the key and one from the login?
  
Currently, I only need to enter the login password.
that is why I do not understand what are these keys
for?
 
 
 If everything is working correctly, you should only be asked for your
 passphrase (see 'man ssh-keygen').
 
 
 However, from 'man ssh':
 
If other authentication methods fail, ssh prompts the user for a pass­
  word.  The password is sent to the remote host for checking; however,
  since all communications are encrypted, the password cannot be seen by
  someone listening on the network.
 
 
 Most of the systems on which I have set up a .ssh/authorized_keys file
 require only the key.  One requires the password instead, although the
 key file is correct as far as I can tell.

It's worth noting that ssh cares about file permissions; it seems to
get upset if your key files are group writable.  Remove group write
permissions and see what happens.

-- 
Nathan Norman Eschew Obfuscation  Network Engineer
GPG Key ID 1024D/51F98BB7http://home.midco.net/~nnorman/
Key fingerprint = C5F4 A147 416C E0BF AB73  8BEF F0C8 255C 51F9 8BB7


pgpeed940p1nY.pgp
Description: PGP signature


Re: SSH again!

2000-06-15 Thread Bob Nielsen
On Thu, Jun 15, 2000 at 08:41:01AM -0500, Nathan E Norman wrote:
 On Wed, Jun 14, 2000 at 04:23:38PM -0700, Bob Nielsen wrote:

  Most of the systems on which I have set up a .ssh/authorized_keys file
  require only the key.  One requires the password instead, although the
  key file is correct as far as I can tell.
 
 It's worth noting that ssh cares about file permissions; it seems to
 get upset if your key files are group writable.  Remove group write
 permissions and see what happens.

The permissions for .ssh/authorized_keys on both boxes (both running
slink) are: -rw-r--r--

The two files are identical, as well.

-- 
Bob Nielsen, N7XY  (RN2)   [EMAIL PROTECTED]
Bainbridge Island, WA  http://www.oz.net/~nielsen
 



Re: SSH again!

2000-06-14 Thread Bob Nielsen
On Wed, Jun 14, 2000 at 04:45:10PM -0500, Timothy C. Phan wrote:
 Hi all,
 
   Don't I suppose to get two prompts for two passwords?
   One from the key and one from the login?
 
   Currently, I only need to enter the login password.
   that is why I do not understand what are these keys
   for?


If everything is working correctly, you should only be asked for your
passphrase (see 'man ssh-keygen').


However, from 'man ssh':

   If other authentication methods fail, ssh prompts the user for a pass­
 word.  The password is sent to the remote host for checking; however,
 since all communications are encrypted, the password cannot be seen by
 someone listening on the network.


Most of the systems on which I have set up a .ssh/authorized_keys file
require only the key.  One requires the password instead, although the
key file is correct as far as I can tell.

Bob

 
 Nitebirdz wrote:
  
  On Wed, 14 Jun 2000, Ethan Benson wrote:
  
   On Wed, Jun 14, 2000 at 09:26:55AM -0500, Timothy C. Phan wrote:
hi All,
   
  I'm still confused about the keys file.
   
  I ran the ssh-keygen on machine-1 with passphrase
  and it created two files in
$HOME/.ssh/identify
$HOME/.ssh/identify.pub
   
  I copy the identify.pub to machine-2:$HOME/.ssh/m1.key
  on machine-2,  I ran the command on machine-2 to logon
  machin-1:
   
 ssh -i $HOME/.ssh/m1.key machine-1
   
  
   put the public key in $HOME/.ssh/authorized_keys in order to allow
   logins using the associated private key.
  
  
  
  Yeah, basically you need to rename that identity.pub file to
  authorized_keys on their other end as far as I remember.  By the way, I
  don't really know what you're trying to do but if you did enter a
  passphrase you will not then be able to ssh or scp to that host without
  entering a password.  I was just thinking that perhaps you're trying to
  set up the whole thing so that you are not prompted for a password at all,
  so you can run scripts remotely.  So, if that is the case keep in mind
  that you do NOT need a passphrase.
  
  --
  Nitebirdz
  http://www.linuxnovice.org
  Tips, articles, news, links...
 
 
 -- 
 Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null

-- 
Bob Nielsen, N7XY  (RN2)   [EMAIL PROTECTED]
Bainbridge Island, WA  http://www.oz.net/~nielsen
 



SSH again!

2000-06-14 Thread Timothy C. Phan
hi All,

  I'm still confused about the keys file.

  I ran the ssh-keygen on machine-1 with passphrase
  and it created two files in
$HOME/.ssh/identify
$HOME/.ssh/identify.pub

  I copy the identify.pub to machine-2:$HOME/.ssh/m1.key
  on machine-2,  I ran the command on machine-2 to logon
  machin-1:

 ssh -i $HOME/.ssh/m1.key machine-1

  and I got this message:

The authenticity of host'machine-1' can't be established.
Key fingerprint is   ...
Are you sure you want to continue connecting (yes/no)

  If I replied yes,  it will create a file in $HOME/.ssh/known_hosts
  and I'll be able to connect after the supplying
  the login password (no the passphrase from the ssh-keygen) 
  to the login prompt.

  If I ran the ssh without specifying the -i m1.key, I can
  still logon to the machine-1. 

  So my question is that what are the keyfile(s) used for?
  Or did I do something stupid ?

  Thanks in advance!

---
tcp



Re: SSH again!

2000-06-14 Thread Ethan Benson
On Wed, Jun 14, 2000 at 09:26:55AM -0500, Timothy C. Phan wrote:
 hi All,
 
   I'm still confused about the keys file.
 
   I ran the ssh-keygen on machine-1 with passphrase
   and it created two files in
 $HOME/.ssh/identify
 $HOME/.ssh/identify.pub
 
   I copy the identify.pub to machine-2:$HOME/.ssh/m1.key
   on machine-2,  I ran the command on machine-2 to logon
   machin-1:
 
  ssh -i $HOME/.ssh/m1.key machine-1
 

put the public key in $HOME/.ssh/authorized_keys in order to allow
logins using the associated private key.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/


pgpKtf1p3mTqW.pgp
Description: PGP signature


Re: SSH again!

2000-06-14 Thread Nitebirdz
On Wed, 14 Jun 2000, Ethan Benson wrote:

 On Wed, Jun 14, 2000 at 09:26:55AM -0500, Timothy C. Phan wrote:
  hi All,
  
I'm still confused about the keys file.
  
I ran the ssh-keygen on machine-1 with passphrase
and it created two files in
  $HOME/.ssh/identify
  $HOME/.ssh/identify.pub
  
I copy the identify.pub to machine-2:$HOME/.ssh/m1.key
on machine-2,  I ran the command on machine-2 to logon
machin-1:
  
   ssh -i $HOME/.ssh/m1.key machine-1
  
 
 put the public key in $HOME/.ssh/authorized_keys in order to allow
 logins using the associated private key.
 
 

Yeah, basically you need to rename that identity.pub file to
authorized_keys on their other end as far as I remember.  By the way, I
don't really know what you're trying to do but if you did enter a
passphrase you will not then be able to ssh or scp to that host without
entering a password.  I was just thinking that perhaps you're trying to
set up the whole thing so that you are not prompted for a password at all,
so you can run scripts remotely.  So, if that is the case keep in mind
that you do NOT need a passphrase.

-- 
Nitebirdz
http://www.linuxnovice.org
Tips, articles, news, links...



Re: SSH again!

2000-06-14 Thread Timothy C. Phan
Hi all,

  Don't I suppose to get two prompts for two passwords?
  One from the key and one from the login?

  Currently, I only need to enter the login password.
  that is why I do not understand what are these keys
  for?

Nitebirdz wrote:
 
 On Wed, 14 Jun 2000, Ethan Benson wrote:
 
  On Wed, Jun 14, 2000 at 09:26:55AM -0500, Timothy C. Phan wrote:
   hi All,
  
 I'm still confused about the keys file.
  
 I ran the ssh-keygen on machine-1 with passphrase
 and it created two files in
   $HOME/.ssh/identify
   $HOME/.ssh/identify.pub
  
 I copy the identify.pub to machine-2:$HOME/.ssh/m1.key
 on machine-2,  I ran the command on machine-2 to logon
 machin-1:
  
ssh -i $HOME/.ssh/m1.key machine-1
  
 
  put the public key in $HOME/.ssh/authorized_keys in order to allow
  logins using the associated private key.
 
 
 
 Yeah, basically you need to rename that identity.pub file to
 authorized_keys on their other end as far as I remember.  By the way, I
 don't really know what you're trying to do but if you did enter a
 passphrase you will not then be able to ssh or scp to that host without
 entering a password.  I was just thinking that perhaps you're trying to
 set up the whole thing so that you are not prompted for a password at all,
 so you can run scripts remotely.  So, if that is the case keep in mind
 that you do NOT need a passphrase.
 
 --
 Nitebirdz
 http://www.linuxnovice.org
 Tips, articles, news, links...