ssh connection instead of telnet
- noqui
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
13 Feb 2025 02:04 - 13 Feb 2025 02:06 #321406
by noqui
ssh connection instead of telnet was created by noqui
Hi, I am trying to replace telnet with ssh
server1@server1:~$ su
Contraseña:
root@server1:/home/me1# ssh meserver2@IP -p 5007
ssh: connect to host IP port 5007: Connection refused
server1@server1:/home/server1# ssh meserver2@IP
meserver2@IP's password:
Linux ecorobot2 6.1.0-29-rt-amd64 #1 SMP PREEMPT_RT Debian 6.1.123-1 (2025-01-02) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Feb 12 22:40:15 2025 from IP
meserver2@server2:~$
Why if i add the port 5007is refused? If I do it in telnet IP 5007 it works fine.
Thanks a lot.
server1@server1:~$ su
Contraseña:
root@server1:/home/me1# ssh meserver2@IP -p 5007
ssh: connect to host IP port 5007: Connection refused
server1@server1:/home/server1# ssh meserver2@IP
meserver2@IP's password:
Linux ecorobot2 6.1.0-29-rt-amd64 #1 SMP PREEMPT_RT Debian 6.1.123-1 (2025-01-02) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Feb 12 22:40:15 2025 from IP
meserver2@server2:~$
Why if i add the port 5007is refused? If I do it in telnet IP 5007 it works fine.
Thanks a lot.
Last edit: 13 Feb 2025 02:06 by noqui.
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 341
- Thank you received: 132
13 Feb 2025 03:45 #321410
by unknown
Replied by unknown on topic ssh connection instead of telnet
Unless you have setup sshd to listen on port 5007 that is the the expected behavior.
But what I think you are trying to do is connect to linuxcncrsh via ssh. To do this you would need to setup a ssh tunnel for telnet on port 5007. This is far beyond the scope of the forums.
Or ssh into the machine running the linuxcncrsh server then in the ssh session telnet into the local host on port 5007. Which I suspect is not what you want to do.
But what I think you are trying to do is connect to linuxcncrsh via ssh. To do this you would need to setup a ssh tunnel for telnet on port 5007. This is far beyond the scope of the forums.
Or ssh into the machine running the linuxcncrsh server then in the ssh session telnet into the local host on port 5007. Which I suspect is not what you want to do.
Please Log in or Create an account to join the conversation.
- noqui
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
13 Feb 2025 04:44 #321414
by noqui
Replied by noqui on topic ssh connection instead of telnet
Thanks for your reply. Ok. I am not trying to use telnet.
For what you said, then i can´t use anymore linuxcncrsh server if i don´t want to use telnet, and then I need to eliminate it from the hal file? Can I connect ssh remotely to the server where i have the linuxcnc running without using telnet and still operate it remotely?
Thanks a lot
For what you said, then i can´t use anymore linuxcncrsh server if i don´t want to use telnet, and then I need to eliminate it from the hal file? Can I connect ssh remotely to the server where i have the linuxcnc running without using telnet and still operate it remotely?
Thanks a lot
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 341
- Thank you received: 132
13 Feb 2025 06:14 #321416
by unknown
Replied by unknown on topic ssh connection instead of telnet
I'm not too sure, there maybe other ways but I don't think there's an "out of the box solution". I don't think network integration was one of the major goals.
You may have to dive deeper into the documentation and source code.
There was a gent trying to integrate LabVIEW with Linuxcnc via nml.
I think your best bet maybe to layout what you want to achieve, keep it to a single and not start multiple threads trying to sort out a little bit at a time.
You could probably write your own client program that connects to linuxcncrsh server, it would still be a telnet connection, but would be a self contained client. That I think would involve diving head first into socket programming, once the initial connection is made is almost similar to reading to a writing from a file, that is a bit of simplification but it's close.
You may have to dive deeper into the documentation and source code.
There was a gent trying to integrate LabVIEW with Linuxcnc via nml.
I think your best bet maybe to layout what you want to achieve, keep it to a single and not start multiple threads trying to sort out a little bit at a time.
You could probably write your own client program that connects to linuxcncrsh server, it would still be a telnet connection, but would be a self contained client. That I think would involve diving head first into socket programming, once the initial connection is made is almost similar to reading to a writing from a file, that is a bit of simplification but it's close.
Please Log in or Create an account to join the conversation.
- noqui
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
13 Feb 2025 09:37 #321429
by noqui
Replied by noqui on topic ssh connection instead of telnet
Thanks you a lot. I can´t keep it to a single thread. Is too complex. I am very happy with this forum. I knew much of the work I would have to do it then alone.
Four sure, I will have to write my own client program that connects to linuxcncrsh server, because I need to operate, at the same time, several linuxcnc's distributed on a LAN.
What I don´t like of telnet, for the moment, is that it sends back a replay for every instruction the client sends.
Anyway, you are of great help. Thanks you.
Four sure, I will have to write my own client program that connects to linuxcncrsh server, because I need to operate, at the same time, several linuxcnc's distributed on a LAN.
What I don´t like of telnet, for the moment, is that it sends back a replay for every instruction the client sends.
Anyway, you are of great help. Thanks you.
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 341
- Thank you received: 132
13 Feb 2025 11:43 #321434
by unknown
Replied by unknown on topic ssh connection instead of telnet
Well it'll be harder for those that want to help if you don't want to keep it to a single thread. This is a common problem on the forum.
If you don't get a reply how could one be sure the command was completed or if there was an issue ?
If you don't get a reply how could one be sure the command was completed or if there was an issue ?
Please Log in or Create an account to join the conversation.
- noqui
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
13 Feb 2025 16:17 - 13 Feb 2025 16:21 #321445
by noqui
Replied by noqui on topic ssh connection instead of telnet
Each CNC will take a specific job, depending on what it comes out from a query in a database. They are all the CNC's in a line, but just one of them will take the job. For example, each CNC, has a different tool, so depending on some given parameters of the material you insert in the query, the database selects the correct CNC to do the job. That's why I need to have them all in a LAN. But at the same time the database is on server with a WAN, so I prefer to use ssh for security reasons and others. So the result of the query sends me data with the selected CNC, and the list of instructions to send to the selected CNC that is the job (instructions) that the CNC should do as well as the connection instructions. Every CNC has it's own IP address, so the idear is to make the connection with SSH. I've seen that they are three ways of setting the Telnet. Not sure how the echo works. Thanks a lot. If you need more data, just let me know.
Last edit: 13 Feb 2025 16:21 by noqui.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20192
- Thank you received: 6874
13 Feb 2025 16:57 #321449
by tommylight
Replied by tommylight on topic ssh connection instead of telnet
Have a look at RSync, it is very versatile so you might be able to bend it to your needs
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Platinum Member
-
Less
More
- Posts: 341
- Thank you received: 132
13 Feb 2025 17:35 #321453
by unknown
Replied by unknown on topic ssh connection instead of telnet
You need to rethink your security model, stop worry about commands being echoed, that's the least of your problems. Once the database server is compromised every other machine on the network will be compromised. SSH isn't going to save the day. All that will do is encrypt the data between A & B.
Please Log in or Create an account to join the conversation.
- noqui
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
14 Feb 2025 20:52 #321588
by noqui
Replied by noqui on topic ssh connection instead of telnet
Thanks you both. Yes I know that the security of the WAN is the most important security thing I must take care, but SSH, will at least secure part of the system. But anyway it is a very good advise. Thanks a lot.
Please Log in or Create an account to join the conversation.
Time to create page: 0.155 seconds