If I want to set my wired network with a specified IP, nerwork mask and gateway, on GNOME I go to System Tools, Network Connections, and edit the wired connection properties. But what’s the file that stores these changes, i.e, the config file that handles ethernet? For the case I have to do it manually…
I already saw that /etc/sysconfig/network/ifcfg-eth0 is clearly not the one…
The other question, I just installed VirtualBox and installed a CentOS guest, to start with some ssh practicing. Transmission from host to guest works, I already learned to copy files from host to guest using scp, but from guest to host doesn’t work. From guest machine I type “ssh [vboxnet0 IP]” and it stands hung, doing nothing. And in host machine, when trying to pull a file from guest using scp with “scp user@[IP_adress]:entirePath/file”, I get the outcome of usage, as if telling me I’m using the command wrong way.
Most likely I’m missing something in the openSUSE host, maybe ssh client? The CentOS guest has both ssh server and client. What am I missing?
On 11/18/2013 09:46 PM, F style wrote:
> The other question, I just installed VirtualBox and installed a CentOS
> guest, to start with some ssh practicing. Transmission from host to
> guest works, I already learned to copy files from host to guest using
> scp, but from guest to host doesn’t work. From guest machine I type “ssh
> [vboxnet0 IP]” and it stands hung, doing nothing. And in host machine,
> when trying to pull a file from guest using scp with “scp
> user@[IP_adress]:entirePath/file”, I get the outcome of usage, as if
> telling me I’m using the command wrong way.
> Most likely I’m missing something in the openSUSE host, maybe ssh
> client? The CentOS guest has both ssh server and client. What am I
> missing?
Is sshd running on the host? That is not automatice in openSUSE.
Have the necessary ssh ports been opened in the fiewwall? You can test this by
temporarily shutting down the firewall.
You appear to be using NetworkManager. In that case, the details are probably in a file in the directory “/etc/NetworkManager/system-connections”. You’ll have to look at the filenames there, and guess which file - perhaps something like “wired connection 1”.
I don’t recommend hand editing.
If you switch from using “NetworkManager” to using “ifup” settings, then it will start using that file. If you want to manually edit, then best to use “ifup” settings.
@Nrickert:
So if I wanted a more CentOS-like feeling, I should switch to ifup. How can I do that?
And even if I ventured to hand edit (for learning purposes, for example) NetworkManager file -which is effectively “Wired connection 1”-, I don’t know how to handle names with spaces. If on console, as root, I typed for example “nano /etc/NetworkManager/system-connections/Wired connection 1”, bash would understand I’m trying to open a file named “Wired” and ignore the rest of the name…
@Lwfinger:
If I open System Monitor on GNOME (openSUSE is my host, as I said), the only ssh running process is “ssh-agent”.
How do I turn off/on firewall?
It will warn you that you are using NetworkManager. The will be a selection on that page to select to “ifup”.
You should probably continue with the network settings and setup the connection using Yast. That will give starting values for the “ifcfg-eth0” file. After that, you can edit the file, then restart the network.
You will have to always quote the filename in commands. Either “file name” or ‘file name’ should work.
I’d normally tell people that they are better off using Yast or NetworkManager for everything. But I’m gathering that you want to gain experience working at the command line.
Thanks all very much. But now I still need a bit of help with the ssh issue…
As I said, if I open System Monitor on GNOME (openSUSE is my host), the only ssh running process is “ssh-agent”. Also, openssh, which is the package I have installed, includes both client and server, so lack of client is not the issue… CentOS guest also has both client and server ssh. But I’m still missing something…
How do I turn off/on firewall?
I don’t have virtualization experience, so this might not answer everything.
To “pull a file”, try
scp scp_user@[IP_adress]:entirePath/file .
You need that second argument (in this case “.” as the current directory) for where to put the file.
You should have sshd running. If it is not running, you will have to start it. That’s probably easiest with Yast. Go to “run level services”, and tell it to start ssh.
For the firewall, Yast → Security and Users → Firewall
and, hopefully, it will be easy to follow from there. You have to select the service (ssh), then click Add (based on memory).
You could, alternatively, start sshd manually. Check the man page. But you would have to do that on every boot. And that doesn’t solve the firewall problem.
On 2013-11-19 07:36, nrickert wrote:
> You could, alternatively, start sshd manually. Check the man page. But
> you would have to do that on every boot. And that doesn’t solve the
> firewall problem.
systemctl status sshd.service
‘start’ to start it, ‘enable’ to have it enabled on every boot, etc.
For configuring the firewall manually, edit the file
“/etc/sysconfig/SuSEfirewall2”. It is full of comments.
Starting sshd with “sudo systemctl start sshd.service” (doesn’t allow me without sudo, unless for checking status) made no difference. Typing “ssh [vboxnet0_IP]” in the guest still hung doing nothing, so I stopped sshd and left it that way.
Then trying pulling files from guest to host by typing in the host “scp user@[IP_adress]:entirePath/file .” with sshd off and it worked anyways.
So sshd is not making difference at all…
Then turned off firewall and tried again “ssh [vboxnet0_IP]” in guest and this time I got
ssh: connect to host [vboxnet0_IP] port 22: Connection refused
I’d expect this message with firewall on, it’s hard to make sense for me…
Also, there was something curious with firewall, I just turn it on or off in the first screen, but hitting ‘Cancel’ button saves the firewall status anyways (either on or off), ???
“Connection refused” means that “sshd” is not running.
With no firewall, you should either get “Connection refused” (daemon not running), or you should connect, though it is still possible for an ssh login to fail for other reasons.
If the firewall is blocking the connection, then you usually see no response except an eventual timeout.
On 2013-11-20 02:46, F style wrote:
>
> Starting sshd with “sudo systemctl start sshd.service” (doesn’t allow me
> without sudo, unless for checking status) made no difference.
Ok, you should do it this way in a terminal:
su -
systemctl enable sshd.service
systemctl restart sshd.service
systemctl status sshd.service
and paste here the entire sequence, commands an results in one mouse
swipe, in code tags, please.
To start or stop the firewall, do:
su -
SuSEfirewall2 start
SuSEfirewall2 stop
without options, it does a reload.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
Can you help me with that?
And also:
There was something curious with firewall, I just turn it on or off in the first screen, but hitting ‘Cancel’ button saves the firewall status anyways (either on or off), ???
> And also:
> There was something curious with firewall, I just turn it on or off in
> the first screen, but hitting ‘Cancel’ button saves the firewall status
> anyways (either on or off), ???
I told you a CLI command to start or stop the firewall. I have no idea
about clicking buttons.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)