i want to set up an SSL Socket that listens for connections. - That will allow people to connect using SSH - yes?
Question 2: The documentation says: [quote]When using an SSLSocket to Listen for a connection, you must specify a CertificateFile.[/quote]
So how do you do this? And how do you know your user on the other end has the correct certificate file??
There’s no examples about how to do this so any pointers is greatly appreciated.
OK. And since Xojo doesn’t have any SSH controls, I’d need to come up with my own then - right?
Bottom line is this: I have an API in my app that people can connect to via telnet and send commands to make the app do things. I’ve had some requests for this to be done in a more secure method like SSH. Is there any way to utilize the SSLSocket to do a secure connection similarly to simply creating a TCPSocket? I get how I could use the SSLSocket in between my own apps. But if you wanted to just use an OS X shell for the connection. How would you do that? With unsecured TCP, I can simply open a telnet connection.
[quote=175676:@Jon Ogden]OK. And since Xojo doesn’t have any SSH controls, I’d need to come up with my own then - right?
Bottom line is this: I have an API in my app that people can connect to via telnet and send commands to make the app do things. I’ve had some requests for this to be done in a more secure method like SSH. Is there any way to utilize the SSLSocket to do a secure connection similarly to simply creating a TCPSocket? I get how I could use the SSLSocket in between my own apps. But if you wanted to just use an OS X shell for the connection. How would you do that? With unsecured TCP, I can simply open a telnet connection.[/quote]
Have you thought about using a REST API instead? You can do all of that with a web app and protect it with an SSL certificate.
FWIW, Travis will be doing a session on building web services at XDC this year.
[quote=175698:@Greg O’Lone]Have you thought about using a REST API instead? You can do all of that with a web app and protect it with an SSL certificate.
FWIW, Travis will be doing a session on building web services at XDC this year.[/quote]
It’s not a Web interface that I have. It’s a command line interface.
Thanks. I was hoping to be able to simply do it with an SSLSocket as I already have a TCPSocket in place and code well defined for that. My hope was I could let the user choose a secure or normal connection simply by setting the Boolean “secure” property of the SSLSocket.
Once I delve into other classes, it becomes much more involved and not something I can quickly push out which was what I was hoping to do. Maybe not…
Last entry about having created an SSH class with Kem?[/quote]
Yes. But that is coded as a client. I’m looking for handling the server end of things. I’ll probably end up adapting that class to do what I want on the server end. But I was looking for something on the server side that was easy to implement as in like “no additional coding.”
This is the key question I asked here. Christian’s classes are client only. The class Kem helped me with is client only.
So - does ANYONE have any advice on how to set up an SSLSocket that listens for connections. Not a Web or HTML socket. This is for a command line interface.
I can set up a secure SSLSocket and set it to listen. However, how do you connect to it? What do you use?
[quote=175770:@Jon Ogden]This is the key question I asked here. Christian’s classes are client only. The class Kem helped me with is client only.
So - does ANYONE have any advice on how to set up an SSLSocket that listens for connections. Not a Web or HTML socket. This is for a command line interface.
I can set up a secure SSLSocket and set it to listen. However, how do you connect to it? What do you use?[/quote]
Its not possible yet in Xojo for since I had been searching for an SSH Server implementation and short of paying Christian to adapt C code to a plugin we don’t have that ability yet.
This is exactly analogous to an HTTP Server, FTP server etc.
None are built in - the sockets are but not specific protocols.
The Socket provides the foundation to implement whatever protocols you want.
The one thing I think is missing is the ability for the server socket to listen securely.
Basically it always listens unsecurely and hands connections off to a TCP socket or subclass.
Shouldn’t the SSH connection go to the server (eg., the OS)? Then the user would use a normal Telnet connection withing the SSH tunnel. In my mind, SSH is external to the app and at the OS level.
That’s an interesting concept and quite an idea. It certainly makes things simple. OS X has a built in ssh server. That would make things quite simple…
I wonder if Putty has an SSH server in it for Windows…I’ll have to go look that up…