scp

Post Reply
Message
Author
bmike1
Posts: 113
Joined: Mon Jul 23, 2012 8:35 pm

scp

#1 Post by bmike1 »

What do you call it when an ip address is converted to words?
Here's the deal, just tonight I transferred a file from Mint17 to MX14 using scp. As you can see (below) I had to type out the full ip address rather than the host name. How do you get it to translate the ip to the hostname? or else..... why is it timing out? It is much easier to type out the host name compared to it's ip address.

username1@hostname1:~/Documents/Earnings/DailyEarnings$ scp Yearly\ Template.ods username2@hostname2:/home/mthavens/Documents
ssh: connect to host hostname2 port 22: Connection timed out
lost connection
^Cusername1@hostname1:~/Documents/Earnings/DailyEarnings$ scp Yearly\ Template.ods username2@192.168.0.2:/home/username2/Documents
username2@192.168.0.2's password:
Yearly Template.ods 100% 51KB 51.4KB/s 00:00
username1@hostname1:~/Documents/Earnings/DailyEarnings$

User avatar
BitJam
Developer
Posts: 2283
Joined: Sat Aug 22, 2009 11:36 pm

Re: scp

#2 Post by BitJam »

If you are using fixed ip addresses then you just need to add a line like this to your /etc/hosts file:

Code: Select all

192.168.0.2        hostname2
If you are using dynamic ip addresses (via dhcpd for example) then it is a little more complicated.

User avatar
timkb4cq
Developer
Posts: 3203
Joined: Wed Jul 12, 2006 4:05 pm

Re: scp

#3 Post by timkb4cq »

Different routers have the settings for lan dns resolution in different places, so it's hard to give a general answer. One thing to remember is that dns resolution on a lan is case sensitive, so mx-14 <> MX-14. Logging into your router's configuration pages (in your case most likely at http://192.168.0.1 ) should let you see what names the machines on your lan are seen as by the router.
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

User avatar
lucky9
Posts: 475
Joined: Wed Jul 12, 2006 5:54 am

Re: scp

#4 Post by lucky9 »

I suspect that they still have the Router's IP address printed or stamped on the bottom of the unit. Careful there is a Reset button somewhere (bottom or back most of the time) also.
Yes, even I am dishonest. Not in many ways, but in some. Forty-one, I think it is.
--Mark Twain

bmike1
Posts: 113
Joined: Mon Jul 23, 2012 8:35 pm

Re: scp

#5 Post by bmike1 »

thanks for inspiring me to figure it out on my own. I had to go into 'Advanced Setup' and then to 'DNS Mapping' of the modem's configuration page (192.168.0.1). After going there I needed to manually map the IP to the host name.

Post Reply

Return to “Older Versions”