Re: open ssh

2019-10-13 Thread George N. White III
On Sat, 12 Oct 2019 at 15:49, Samuel Sieb  wrote:

> On 10/12/19 7:25 AM, Angelo Moreschini wrote:
> > /Thank you for your answers which provided me with useful basics on how
> > Linux establishes DNS./
> >
> > /However, even reading other documentation, I am still not clear what
> > mechanisms for which a computer becomes accessible in the LAN through
> > its name:/
>
> [...]
> You would only setup bind if you want to use a full domain setup on your
> local network.  Most people have no need of this.
>
> Summary:
> In a default setup, host name resolution is, in order of priority:
> /etc/hosts/, mdns, and dns.
> You probably don't want to maintain a hosts file for all the computers
> on your network, especially if you are using DHCP.
> DNS is generally way overkill and more work to manage.
> The easiest method is to use mdns, otherwise known as Bonjour on Macs
> and probably some other names.  Use "hostnamectl set-hostname myname" to
> set a unique name on each computer.  Make sure "avahi-daemon" is running
> (should be).  Make sure you have "nss-mdns" installed (should be by
> default).  Then you should be able to do "ping myname" (using whatever
> name you set earlier).
>

Bonjour is often found on Windows machines.   It was often installed by
printer drivers and other network clients (e.g., home automation).
Windows 10 has had several iterations of something resembling mDNS.
You can't rely on it working after each update.   Meanwhile, Apple
Bonjour has a serious bug (due to missing quotes, it can used to
run "C:\Programs" with full privileges, so if a bad guy can install malware
as a regular use and call it "C:\Programs", they own your system.  Bonjour
is often banned from corporate networks, so if your network has Windows
machines you should be prepared to use the
"C:\Windows\System32\Drivers\etc\hosts" file.  Editing this file does
require
administrative super-powers.


-- 
George N. White III
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-13 Thread Tim via users
On Sat, 2019-10-12 at 11:48 -0700, Samuel Sieb wrote:
> You would only setup bind if you want to use a full domain setup on
> your local network.  Most people have no need of this.

There are other benefits.  Learning DNS (if that's good for you). 
Working around lousy DNS servers from your ISP.  Most things that you
can connect to a LAN will use DNS to resolve addresses, *nearly* most
modern things will use MDNS, a lot of simpler/older things will only
use DNS.

> You probably don't want to maintain a hosts file for all the
> computers on your network, especially if you are using DHCP.

I'd say that unless your IPs are fixed to always be the same addresses
(whatever method is used), using the hosts file will be the cause of
some problems.  Using multiple hosts file (one on each PC) just
increases the work required.

> DNS is generally way overkill and more work to manage.

For most people probably, and using BIND would be.  Though there are
smaller DNS servers that can read your hosts file, then serve that data
to all the other computers on your LAN.

If you have a decent modern router, it may be able to do all of this
for you, anyway.
 
-- 
 
uname -rsvp
Linux 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 30 14:19:46 UTC 2019 x86_64
 
Boilerplate:  All unexpected mail to my mailbox is automatically deleted.
I will only get to see the messages that are posted to the mailing list.
 
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-12 Thread Ed Greshko

On 10/13/19 5:53 AM, Tom Horsley wrote:

On Sat, 12 Oct 2019 22:48:19 +0100
Patrick O'Callaghan wrote:


And that the file /etc/nssswitch.conf contains a line similar to:

Just be aware that file is overwritten by authselect with
whatever values will cause the most headaches :-).


Would "chattr +i /etc/nsswitch.conf" have helped with your headache?


--
If simple questions can be answered with a simple google query then why are 
there so many of them?
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-12 Thread Samuel Sieb

On 10/12/19 2:50 PM, Ed Greshko wrote:

On 10/13/19 2:48 AM, Samuel Sieb wrote:

Summary:
In a default setup, host name resolution is, in order of priority: 
/etc/hosts/, mdns, and dns.


The order is controlled by the contents of /etc/nsswitch.conf.  The 
defaults are as discribed.


I was trying to reduce the complication a bit so I didn't mention that.

You probably don't want to maintain a hosts file for all the computers 
on your network, especially if you are using DHCP.

DNS is generally way overkill and more work to manage.
The easiest method is to use mdns, otherwise known as Bonjour on Macs 
and probably some other names.  Use "hostnamectl set-hostname myname" 
to set a unique name on each computer.  Make sure "avahi-daemon" is 
running (should be).  Make sure you have "nss-mdns" installed (should 
be by default).  Then you should be able to do "ping myname" (using 
whatever name you set earlier). 


I'm not well versed in the use of mdns since some  devices on my 
networks don't utilized it.  So, I tend to
setup a DNS server in the routers I use.  This leads me to wonder if it 
is possible to actually "ping myname".

I thought one needed "ping myname.local".


That is correct.  I was confused by the DNS before when I thought this 
was working.  If you set your DNS domain to .local then I think it would 
work.

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-12 Thread Tom Horsley
On Sat, 12 Oct 2019 22:48:19 +0100
Patrick O'Callaghan wrote:

> And that the file /etc/nssswitch.conf contains a line similar to:

Just be aware that file is overwritten by authselect with
whatever values will cause the most headaches :-).
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-12 Thread Ed Greshko

On 10/13/19 2:48 AM, Samuel Sieb wrote:

Just a couple of comments


Summary:
In a default setup, host name resolution is, in order of priority: /etc/hosts/, 
mdns, and dns.


The order is controlled by the contents of /etc/nsswitch.conf.  The defaults 
are as discribed.


You probably don't want to maintain a hosts file for all the computers on your 
network, especially if you are using DHCP.
DNS is generally way overkill and more work to manage.
The easiest method is to use mdns, otherwise known as Bonjour on Macs and probably some other names.  Use "hostnamectl set-hostname myname" to set a unique name on each computer.  Make sure "avahi-daemon" is running (should be).  Make sure you have "nss-mdns" installed (should be by default).  Then you should be able to do "ping myname" (using whatever name you set earlier). 


I'm not well versed in the use of mdns since some  devices on my networks don't 
utilized it.  So, I tend to
setup a DNS server in the routers I use.  This leads me to wonder if it is possible to 
actually "ping myname".
I thought one needed "ping myname.local".


[egreshko@meimei ~]$ ping f31bk
ping: f31bk: Name or service not known

[egreshko@meimei ~]$ ping f31bk.local
PING f31bk.local (192.168.1.55) 56(84) bytes of data.
64 bytes from 192.168.1.55 (192.168.1.55): icmp_seq=1 ttl=64 time=0.316 ms
64 bytes from 192.168.1.55 (192.168.1.55): icmp_seq=2 ttl=64 time=0.265 ms
64 bytes from 192.168.1.55 (192.168.1.55): icmp_seq=3 ttl=64 time=0.234 ms
64 bytes from 192.168.1.55 (192.168.1.55): icmp_seq=4 ttl=64 time=0.239 ms

--
If simple questions can be answered with a simple google query then why are 
there so many of them?
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-12 Thread Patrick O'Callaghan
On Sat, 2019-10-12 at 11:48 -0700, Samuel Sieb wrote:
> The easiest method is to use mdns, otherwise known as Bonjour on Macs 
> and probably some other names.  Use "hostnamectl set-hostname myname" to 
> set a unique name on each computer.  Make sure "avahi-daemon" is running 
> (should be).  Make sure you have "nss-mdns" installed (should be by 
> default).  Then you should be able to do "ping myname" (using whatever 
> name you set earlier).

And that the file /etc/nssswitch.conf contains a line similar to:

hosts:  files mdns4_minimal [NOTFOUND=return] dns myhostname

poc
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-12 Thread Samuel Sieb

On 10/12/19 7:25 AM, Angelo Moreschini wrote:
/Thank you for your answers which provided me with useful basics on how 
Linux establishes DNS./


/However, even reading other documentation, I am still not clear what 
mechanisms for which a computer becomes accessible in the LAN through 
its name:/


Details at the end.

/There are two important files: etc / hosts, etc / hostname and a system 
service  which are used to manage this problem, but it is not 
clear to me how (mechanism) they work, collaborate and interact./


"/etc/hosts" contains a manual mapping of names to IP addresses.  It is 
only useful in very limited cases.  I use it to block a lot of ads by 
mapping the ad server names to my localhost.  But I've also used it for 
accessing remote sites that don't have a real DNS name.  "hostname" is 
just a little utility to print out what the name the computer has been 
assigned.  "hostnamectl" is a utility to set (and view) the current and 
permanent computer name.


/The DNS is defined and presented to an unsuspecting reader (also in the 
Fedora manuals) as a telephone directory which provides the telephone 
number of each subscriber to a hypothetical phone company OK./


/It is said that this telephone directory is modeled as a tree structure 
at the top of which we find the domains .com, .org, gov, .fr, it, etc. 
and works as a centralized server of the network that supplies the 
numbers in correspondence of names … //OK, OK…./


/This type of solution applies to large computer networks of course./


This is how the internet works.  It's really a distributed directory. 
The .org, .fr, etc are managed by a top-level server and below that each 
group, company, or person manages their own part.  It can also be used 
in an internal network no matter what size.  I run freeipa which helps 
manage users and dns entries on my home network and at a school.


/But since this clarification is not explicitly highlighted it can be 
confusing to a reader who reads the manual for the first time //in what 
context DNS is applied//...:/


Unless you have a local override, DNS is what is used to resolve a 
network name.


/Another is to get the name of a computer in a LAN and other is to 
create a DNS server .. and context difference (and the different 
solutions) is not highlighted in the manuals ...:/


/It was difficult for me and I am still personally bewildered to 
distinguish which two different contexts may be .../


/That is to say ... when to simply use the Linux kernel service and when 
it can be useful to create a DNS server implemented via BIND./


You would only setup bind if you want to use a full domain setup on your 
local network.  Most people have no need of this.


Summary:
In a default setup, host name resolution is, in order of priority: 
/etc/hosts/, mdns, and dns.
You probably don't want to maintain a hosts file for all the computers 
on your network, especially if you are using DHCP.

DNS is generally way overkill and more work to manage.
The easiest method is to use mdns, otherwise known as Bonjour on Macs 
and probably some other names.  Use "hostnamectl set-hostname myname" to 
set a unique name on each computer.  Make sure "avahi-daemon" is running 
(should be).  Make sure you have "nss-mdns" installed (should be by 
default).  Then you should be able to do "ping myname" (using whatever 
name you set earlier).

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-12 Thread Angelo Moreschini
*Thank you for your answers which provided me with useful basics on how
Linux establishes DNS.*

*However, even reading other documentation, I am still not clear what
mechanisms for which a computer becomes accessible in the LAN through its
name:*

*There are two important files: etc / hosts, etc / hostname and a system
service  which are used to manage this problem, but it is not
clear to me how (mechanism) they work, collaborate and interact.*


*There is another aspect of the DSN that I would like to understand better:*

*The DNS is defined and presented to an unsuspecting reader (also in the
Fedora manuals) as a telephone directory which provides the telephone
number of each subscriber to a hypothetical phone company OK.*

*It is said that this telephone directory is modeled as a tree structure at
the top of which we find the domains .com, .org, gov, .fr, it, etc. and
works as a centralized server of the network that supplies the numbers in
correspondence of names … **OK, OK….*

*This type of solution applies to large computer networks of course.*

*But since this clarification is not explicitly highlighted it can be
confusing to a reader who reads the manual for the first time **in what
context DNS is applied**...:*

*Another is to get the name of a computer in a LAN and other is to create a
DNS server .. and context difference (and the different solutions) is not
highlighted in the manuals ...:*

*It was difficult for me and I am still personally bewildered to
distinguish which two different contexts may be ...*

*That is to say ... when to simply use the Linux kernel service and when it
can be useful to create a DNS server implemented via BIND.*


*Thand you*



*Angelo*

On Sat, Oct 5, 2019 at 4:26 PM Ed Greshko  wrote:

> On 10/5/19 3:56 AM, Samuel Sieb wrote:
> > On 10/4/19 6:35 AM, George N. White III wrote:
> >> On Fri, 4 Oct 2019 at 06:41, Angelo Moreschini <
> mrangelo.fed...@gmail.com > wrote:
> >>
> >>
> >>
> >> currently I perform operations between different computers in my
> >> local network using open SSH; however, when I do this, I always use
> >> the computer's IP number to reference the host. (ex: sudo ssh
> >> angelo_dev@10.0.0.15 )
> >>
> >> I'm wondering without yet finding an answer how to do the same thing
> >> using (instead of the IP address) the name of the computer ..
> >> Do I have to Installase BIND? And then what else is needed? ...
> >>
> >>
> >> Have you tried Multicast DNS <
> https://en.wikipedia.org/wiki/Multicast_DNS>?See mDNS on Fedora Linux
> 
> >
> > This is what I was just going to suggest.  You need to set on each
> computer a unique hostname with "hostnamectl" and make sure that avahi is
> running.  On the computer you're connecting from, make sure you have
> "nss-mdns" installed (I don't know if it is by default).  Then you can use
> ".local" to connect.  If you don't set a hostname, I think the
> default is "linux", so you end up with linux.local, linux-2.local, etc.
> >
>
> One thing to be aware of, and not mentioned in the fedora magazine article
> is you happen to
> have a network with some hosts using IPv6 only you need to change the
> nsswitch.conf
> host line to mdns_minimal instead of mdns4_minimal.
>
>
> --
> If simple questions can be answered with a simple google query then why
> are there so many of them?
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
>
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-05 Thread Ed Greshko

On 10/5/19 3:56 AM, Samuel Sieb wrote:

On 10/4/19 6:35 AM, George N. White III wrote:

On Fri, 4 Oct 2019 at 06:41, Angelo Moreschini mailto:mrangelo.fed...@gmail.com>> wrote:



    currently I perform operations between different computers in my
    local network using open SSH; however, when I do this, I always use
    the computer's IP number to reference the host. (ex: sudo ssh
    angelo_dev@10.0.0.15 )

    I'm wondering without yet finding an answer how to do the same thing
    using (instead of the IP address) the name of the computer ..
    Do I have to Installase BIND? And then what else is needed? ...


Have you tried Multicast DNS ?    See 
mDNS on Fedora Linux 


This is what I was just going to suggest.  You need to set on each computer a unique hostname with "hostnamectl" 
and make sure that avahi is running.  On the computer you're connecting from, make sure you have "nss-mdns" 
installed (I don't know if it is by default).  Then you can use ".local" to connect.  If you 
don't set a hostname, I think the default is "linux", so you end up with linux.local, linux-2.local, etc.



One thing to be aware of, and not mentioned in the fedora magazine article is 
you happen to
have a network with some hosts using IPv6 only you need to change the 
nsswitch.conf
host line to mdns_minimal instead of mdns4_minimal.


--
If simple questions can be answered with a simple google query then why are 
there so many of them?
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-04 Thread Samuel Sieb

On 10/4/19 6:35 AM, George N. White III wrote:
On Fri, 4 Oct 2019 at 06:41, Angelo Moreschini 
mailto:mrangelo.fed...@gmail.com>> wrote:




currently I perform operations between different computers in my
local network using open SSH; however, when I do this, I always use
the computer's IP number to reference the host. (ex: sudo ssh
angelo_dev@10.0.0.15 )

I'm wondering without yet finding an answer how to do the same thing
using (instead of the IP address) the name of the computer ..
Do I have to Installase BIND? And then what else is needed? ...


Have you tried Multicast DNS 
?    See mDNS on Fedora 
Linux 


This is what I was just going to suggest.  You need to set on each 
computer a unique hostname with "hostnamectl" and make sure that avahi 
is running.  On the computer you're connecting from, make sure you have 
"nss-mdns" installed (I don't know if it is by default).  Then you can 
use ".local" to connect.  If you don't set a hostname, I 
think the default is "linux", so you end up with linux.local, 
linux-2.local, etc.

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-04 Thread Fred Smith
On Fri, Oct 04, 2019 at 09:15:06AM -0400, Tom Horsley wrote:
> On Fri, 4 Oct 2019 12:40:58 +0300
> Angelo Moreschini wrote:
> 
> > Do I have to Installase BIND? And then what else is needed? ...
> 
> My router can run a DNS name server, you might want to check
> if yours has that feature. Otherwise running bind or dnsmasq
> somewhere on the local network would be the way to go.

I set up DNS/Bind9 and NTP on a raspberry pi somewhat over a  year ago.
cheap, doesn't tie up a bigger machine someone has on desktop (like, e.g.,
me) and uses minimal electricity.


-- 
 Fred Smith -- fre...@fcshome.stoneham.ma.us -
   But God demonstrates his own love for us in this: 
 While we were still sinners, 
  Christ died for us.
--- Romans 5:8 (niv) --
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-04 Thread George N. White III
On Fri, 4 Oct 2019 at 06:41, Angelo Moreschini 
wrote:

>
>
> currently I perform operations between different computers in my local
> network using open SSH; however, when I do this, I always use the
> computer's IP number to reference the host. (ex: sudo ssh
> angelo_dev@10.0.0.15)
>
> I'm wondering without yet finding an answer how to do the same thing using
> (instead of the IP address) the name of the computer ..
> Do I have to Installase BIND? And then what else is needed? ...
>

Have you tried Multicast DNS ?
  See mDNS on Fedora Linux


-- 
George N. White III
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-04 Thread Tom Horsley
On Fri, 4 Oct 2019 12:40:58 +0300
Angelo Moreschini wrote:

> Do I have to Installase BIND? And then what else is needed? ...

My router can run a DNS name server, you might want to check
if yours has that feature. Otherwise running bind or dnsmasq
somewhere on the local network would be the way to go.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-04 Thread Frederic Muller
On 10/4/19 4:40 PM, Angelo Moreschini wrote:
>
>
> currently I perform operations between different computers in my local
> network using open SSH; however, when I do this, I always use the
> computer's IP number to reference the host. (ex: sudo ssh
> angelo_dev@10.0.0.15 )
>
> I'm wondering without yet finding an answer how to do the same thing
> using (instead of the IP address) the name of the computer ..
> Do I have to Installase BIND? And then what else is needed? ...
>
> thanks for every suggestion
>
> Angelo
>
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Hi!

A quick way to fix that would be to set up a config file under .ssh to
list username, machine IP and eventually SSH keys and then add a
nickname for that machine.

I have that in mine:

Host machine_nickname
    Hostname 192.168.0.1
    User fred_onfedora
    IdentityFile ~/.ssh/nickname_rsa
    PubkeyAuthentication yes


And then for a machine where I use password (didn't manage to make keys
work yet and tired of typing the password I use a python scrypt which I
probably found on stackexchange:

!/usr/bin/python
   

from ConfigParser import ConfigParser
import pexpect

def main():
    url = "fred_onfedora@192.168.0.2"
    user, host = url.split('@', 1)

    cfg_file = '/home/fred/bin/ssh.cfg'
    cfg = ConfigParser()
    cfg.read(cfg_file)
    passwd = cfg.get(user, host)

    child = pexpect.spawn('ssh -p 54 {0}'.format(url))
    child.expect('password:')
    child.sendline(passwd)
    child.interact()

if __name__ == '__main__':
    main()

then as you can guess I have a ssh.cfg file set to 600 containing this:

[fred_onfedora]
192.168.0.1 = mypasswordhasnospace

Both work for me.

Hope this helps you.

Fred
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: open ssh

2019-10-04 Thread GianPiero Puccioni

On 04/10/2019 11:40, Angelo Moreschini wrote:



currently I perform operations between different computers in my local network using 
open SSH; however, when I do this, I always use the computer's IP number to reference 
the host. (ex: sudo ssh angelo_dev@10.0.0.15 )

I'm wondering without yet finding an answer how to do the same thing using 
(instead of the IP address) the name of the computer ..
Do I have to Installase BIND? And then what else is needed? ...

thanks for every suggestion

Angelo



The simplest way is to put a line in /etc/hosts with


10.0.0.15compname


G
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org