Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have two machines and boot them with various live distros (one at the time ), but when I try to connect with ssh, I seem to invariably get "ssh: <whatever>: Name or service not known".
Using ssh between a live and an installed system works here. If it is possible to use ssh between live/live systems, I would be very interested in example(s) of ssh commands...! TIA!!
You would most likely need to start the SSH daemon before it would accept connections. Which liveCD are you using? Look in /etc/init.d/ for an ssh script... "sudo /etc/init.d/ssh start" should work on Ubuntu or derivatives.
You would most likely need to start the SSH daemon before it would accept connections. Which liveCD are you using? Look in /etc/init.d/ for an ssh script... "sudo /etc/init.d/ssh start" should work on Ubuntu or derivatives.
Thank you. Yes, I have made sure that SSH is active on both machines, and there is no problem connecting live/installed or vice versa, but when both machines are booted with a live distro I can't get it to work...
The distros I've tried are Frugalware 0.8, Wolvix 1.1 and SLAX 6.0.3; i.e. Slackware derivatives. Maybe it is just impossible...
I have two machines and boot them with various live distros (one at the time ), but when I try to connect with ssh, I seem to invariably get "ssh: <whatever>: Name or service not known".
Can you copy/paste the exact command you're typing, and the exact error message you're seeing?
There is no reason you should not be able to ssh between 'live' boxes, assuming sshd is running, accepting tcp connections on the interface you think it is, a hole is poked in the firewall, the boxes are on subnets that can reach one another, etc., etc.
Can you copy/paste the exact command you're typing, and the exact error message you're seeing?
There is no reason you should not be able to ssh between 'live' boxes, assuming sshd is running, accepting tcp connections on the interface you think it is, a hole is poked in the firewall, the boxes are on subnets that can reach one another, etc., etc.
ssh is activated automatically during boot in both distros (in Frugalware I have to issue "service sshd start").
I am in root@slax and root@wolvix, respectively.
Trying e.g. "ssh root 10.0.0.35" from M1, gives "ssh: root: Name or service not known". I have tried other combinations, like "ssh root@10.0.0.35", "ssh 10.0.0.35: /root", and so on, but always get the same reply.
Is there a network configuration setting in the live distros which disallows remote entrance to root?
None of these distros has a preconfigured user; only root. If I could easily make a user, I could perhaps connect to user and su to root?
Is there a network configuration setting in the live distros which disallows remote entrance to root?
Yes, and it's in /etc/ssh/sshd.conf "PermitRootLogin"
Quote:
If I could easily make a user, I could perhaps connect to user and su to root?
That is usually how it is done, as this is more secure than allowing root logins over ssh.
The command you will need is ssh username@10.0.0.35 or whatever the IP of the other computer is.
Yes, and it's in /etc/ssh/sshd.conf "PermitRootLogin"
OK, but I never manage to save and exit vi... Can't understand why not all distros come with nano. Care to tell me how?
Quote:
That is usually how it is done, as this is more secure than allowing root logins over ssh.
The command you will need is ssh username@10.0.0.35 or whatever the IP of the other computer is.
Hmm... How do I create a user in a live distro? Just "adduser <somename>"? Yes, I am a Linux newbie... And when I exit from root, will I then be the user? And if that happens, will I get back in root just by issuing "root", since no root password is set up in the live distro, or must I create a password for root?
---
Edit: I seem to have been able to uncomment "PermitRootLogin yes", but trying to log in to SLAX gives this:
root@x__x:/# ssh root 10.0.0.36
ssh: root: Name or service not known
root@x__x:/# ssh root@10.0.0.36
ssh: connect to host 10.0.0.36 port 22: Connection refused
root@x__x:/# ssh slax@10.0.0.36
ssh: connect to host 10.0.0.36 port 22: Connection refused
root@x__x:/#
When you use that exact command, what is the exact error message? (I doubt it's the same as the other - incorrect - usages.)
Also, on the box you're attempting to ssh to, what do the following commands show:
# pgrep sshd
# iptables -nvL
What I said about the error messages being the same was probably not true, but said in desperation. I will come back with answers to your questions when I have booted to the live distro on this machine.
Meanwhile I have tried the commands in the SLAX Live on the other machine (which I cannot connect to, even after the change in sshd_config):
root@slax:/# pgrep sshd
root@slax:/#
root@slax:/# iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
root@slax:/#
When you use that exact command, what is the exact error message? (I doubt it's the same as the other - incorrect - usages.)
Also, on the box you're attempting to ssh to, what do the following commands show:
# pgrep sshd
# iptables -nvL
I have now booted to Frugalware 0.8 Live on this machine and run the commands:
# pgrep sshd
6660
# iptables -nvL
--> gives the same reply as SLAX and as copied in my last post.
In Frugalware, one can log in as user ("fwlive") or root ("root"), with given passwords. When, from SLAX, I issue:
root@slax:/# ssh fwlive@169.254.133.235
a connection seems to be opened (I get no messages, no prompt), but commands, like "ls", "root" or "su", do nothing except appear printed on the screen. The prompt does not return. However, after a while, I get this message: "ssh: connect to host 169.254.133.235 port 22: Connection timed out"
Might the reason be that Frugalware gets that inet address, and not the usual 10.0.0.xx other live distros get, and that ssh does not get a DNS match for it?? Just a wild guess...
Also, when I boot Frugalware on my other machine, it does get a 10.0.0.xx inet address, and I can log into Frugalware on that machine from Linux *installed* on another machine...
root@slax:/# ssh fwlive@169.254.133.235
ssh: connect to host 169.254.133.235 port 22: Connection timed out
Is the sshd running on the machine at 169.254.133.235?
Also note that if you are going to make a change to the sshd.conf file, you need to restart the sshd for the change to be recognised, usually with /etc/init.d/ssh restart
Is the sshd running on the machine at 169.254.133.235?
Also note that if you are going to make a change to the sshd.conf file, you need to restart the sshd for the change to be recognised, usually with /etc/init.d/ssh restart
Thank you for this and your other post. Very useful!
Yes, I finally found out about "Esc" and ":wq". I shall say nothing more about vi(m). For now...
I suspected I would have to restart sshd after the config change, but I only did "/usr/sbin/sshd". Will try your suggestion.
When I boot to Frugalware and su to root, I start sshd by "service sshd start". I do a ifconfig before or after starting sshd. So, yes, sshd is running on the machine where ifconfig reports 169.254.133.235 - I get a message saying something like "Starting sshd daemon". Besides, I have successfully used the same procedure with Frugalware booted on my other machine and connecting to it from my main (this) machine using Bluewhite64 installed.
I tried "/etc/init.d/ssh restart", but no go.
"which" says it cannot find any instance of "init.d"...
I don't know anything about frugalware, but it seems that you should restart the sshd with service sshd restart
not /etc/init.d/ssh restart
Which is a debian (k)ubuntu thing.
I am puzzled as to what it is that you are trying to do.
You have some strange choices of distros for a newbie, (which means that I do not automatically know that you need the service sshd restart thing for example), although there is nothing inherently wrong with that.
Why are you running from live distros? They are a PITA for anything except seeing if your hardware is detected properly, and fixing-up really bad fsck-ups.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.