You are not logged in.

#1 2019-09-02 20:31:54

cx
Member
Registered: 2019-08-17
Posts: 107

[SOLVED] Getting my Arch32 box connected with OpenSSH

As well for a finger exercise for building a home network as for a kind of emergency operation I want to connect my 64Bit Arch box with a lagging Arch32 pentium4 via OpenSSH.

Unfortunately I’m yet a totally noob in network matters though I of course used LAN computers in an office. But setting up my own I still mix up basic things! So far I’ve read the Arch OpenSSH wiki, the Ubuntu Heimnetzwerk#SSH wiki, and the Ubuntu SSH wiki. Hopefully you guys can help me getting into grips ...

This is my actual situation:

  • a Linux box "arch64" (i86_64) as the main computer

  • a Linux box "arch32" (pentium4)

  • both connected to a switch by cable

  • switch also connected to a router for WAN

  • yet no common server or domain

  • both use DHCP

  • both have openssh installed

My confusion simply starts with both the configuration and usage of ssh. Say, if I want the arch64 box to be the server and the arch32 box to be a client, can the server also actively connect 'client-like' to the arch32 client? How to configure both client and server with DHCP? Can I login with the normal user passwords?

Last edited by cx (2019-09-04 19:53:12)

Offline

#2 2019-09-02 23:42:58

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: [SOLVED] Getting my Arch32 box connected with OpenSSH

On the server, systemctl start sshd, on the client ssh user@ip_address, using the relevant password for that user.  You can also set it up to use keys, so actually you use a password to unlock that key and it connects using those credentials, but that's probably something you do after you get it working to begin with.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#3 2019-09-03 05:49:32

deep42thought
Administrator
From: Jena, Germany
Registered: 2017-06-17
Posts: 617

Re: [SOLVED] Getting my Arch32 box connected with OpenSSH

in my experience it's straight forward (e.g.: use the steps levi pointed out), the only "ugly" thing is finding and remembering the ip addresses.
Run

ip addr

on the server to accomplish that.
You can probably also set up fixed ip addresses in your router for the two computers (or the server one at least) matched by their mac addresses.
Remember to

systemctl enable sshd

if you like the ssh server to autostart at boot.

regards,
deep42thought

Offline

#4 2019-09-04 12:16:35

cx
Member
Registered: 2019-08-17
Posts: 107

Re: [SOLVED] Getting my Arch32 box connected with OpenSSH

levi wrote:
cx wrote:

OK, that’s worth a try. And yet I have my other Linux box, and a switch where both are connected to each other, as I’ve plans to set up a home network anyway. I am nearly unexperienced with that topic though, and I’ll teach myself following Arch’s OpenSSH Wiki and maybe others. – Will I need a domain for this?

No, you're not accessing this remotely, so you can refer to it by local IP and you can't do any kind of lookup for those, so you don't need a domain.

[quote-link]
No, I rather mean a "localdomain" as in /etc/hosts, so that my Arch boxes are proper members of a common LAN, such as WORKGROUP, for example. Or can ".localdomain" be omitted, at least for an ad-hoc (ssh) connection?


deep42thought wrote:

in my experience it's straight forward (e.g.: use the steps levi pointed out), the only "ugly" thing is finding and remembering the ip addresses.
Run

ip addr

on the server to accomplish that.
You can probably also set up fixed ip addresses in your router for the two computers (or the server one at least) matched by their mac addresses.
Remember to

systemctl enable sshd

if you like the ssh server to autostart at boot.

regards,
deep42thought

Well, I’ve been trying this since two days (by just starting sshd for now), but all I always get is "connection refused" (instead of an anticipated login prompt), no matter in what direction I want to connect or whether I use myuser@<IP> or myuser@<localhost>. Probably I’m missing something trivial~


Edit:  The next thing is, as I understand, only clients can connect to a server. So, if I set up the Arch 32 box as the ssh server in order to connect it from my Arch 64 box, which is the client, but then the server box gets frozen (in X) – how would that work anyway?

Last edited by cx (2019-09-04 14:30:47)

Offline

#5 2019-09-04 16:01:41

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: [SOLVED] Getting my Arch32 box connected with OpenSSH

You could define .local names for all of your local machines, but I've never bothered personally.  Bash remembers my recent ssh commands including the ip addresses.  If you're using a dynamic address for your server, I guess defining a name for it in the router configuration utility might have it's benefits, but I went for a static address and just use that myself.

X shouldn't freeze when you connect to it.  The ssh should connect to a different tty and use that which should work alongside any tty dedicated to X.  If X is freezing it might be part of the problem we're trying to debug.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#6 2019-09-04 18:54:47

cx
Member
Registered: 2019-08-17
Posts: 107

Re: [SOLVED] Getting my Arch32 box connected with OpenSSH

Well, of course I don’t mean X (or better: at least most parts of desktop) could freeze when connecting to the Arch32 box via ssh. I fear also not to be able to execute a dmesg on it via ssh after it got frozen, because that’s what we’re looking for.

But – that’s to be found out in future when I managed to use the ssh business at all~ *knocks on wood*
Therefore, any ideas why the connections are still refused?
Which computer should be the ssh server, the Arch64 or the Arch32 one, or both..?   Alas, sometime it hurts~ tongue

Offline

#7 2019-09-04 19:39:43

cx
Member
Registered: 2019-08-17
Posts: 107

Re: [SOLVED] Getting my Arch32 box connected with OpenSSH

Heureka – all of a sudden, now it works!!
And I executed a dmesg on the Arch32 and piped it into a file! big_smile

What I just did was starting ssh on it, looked for its IP, and was able to log in from the Arch64 with the Arch32’s users password. – But I already tried it also that way five, six times before ...

Anyway this suffices for the actual purpose. Thanks all!

Last edited by cx (2019-09-04 19:52:41)

Offline

Board footer

Powered by FluxBB