-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
saspy connection with ssh key authentication. #633
Comments
Hey, well the first problem is that your configuration definition is wrong. You've coded it to try to use both IOM and STDIO over SSH at the same time. How did you come up with that configuration definition? Or more importantly, what kind of SAS server are you trying to connect to. FWIW, since you provided the IOM keys in the config, that's what it tried to use to connect with. The STDIO over SSH keys were ignored. Have you looked at this to understand what access method you should be using to get to whatever SAS you're trying to connect to? That's the place to start. Then when you know which access method, you only use the configuration keys for that access method. you can't mix different ones in one configuration def. |
Sorry for the confusion. My SAS9.4M6 is installed on AIX7.2 VM whose whole name is jappsasapp02.onefiserv.net and I am trying to connect from Windows Server 2016 with saspy. Currently, the following configuration works with user/password defined in _authinfo with 1 line starting 'IOM_SASAPP02':
I tried to change iomhost and iomport to host and port as below:
Now it is different error:
how to make key authentication work? |
Ok, so you have a workspace server deployment on that VM, that you can connect to with the first, valid configuration definition: What you're trying to do with the Thanks, |
The reason why I am trying to connect saspy from user/password to ssh key authentication is that my company changed password to be managed by CyberArk Cloud. It's going to be reset every day which is very inconvenient for me to use user/password login that is unsecure anyway. According to the instructions at https://sassoftware.github.io/saspy/configuration.html#ssh, ssh key authentication should be available. Are you telling me that is not True? If it is really available, can you give me a valid example? Thanks. |
That has to be very tedious, to have your pw changed every day! So, you can use STDIO over SSH (SSH access method) instead of the IOM access method, to use ssh keys to connect to the remote server and start a SAS session. That won't be connecting to a Workspace server using metadata credentials, rather it will just be starting up a SAS process on the same machine where those run. So it's not the same as using the IOM access method which connects to a Workspace server with metadata authentication and authorization. IOM is SAS's proprietary client/server interface. It has no way for you to add ssh to it. It authenticates to the SAS server side based upon how that's all configured by SAS Admins. In your case, that's user/pw. It's not insecure, but having to change the pw every day would be a pain. |
Tom: |
The doc is right here: https://sassoftware.github.io/saspy/configuration.html#ssh And no, I'm not saying anything like that. Every access method supports all of the methods of SASPy. You already the SSH configuration keys defined in the config def you have with the IOM keys, which isn't valid and doesn't make sense. Only use the ones for the access method your trying to use. |
Is your feature request related to a problem? Please describe.
saspy connection with ssh key authentication fails.
Describe the solution you'd like
See Additional context.
Describe alternatives you've considered
user/password authentication.
Additional context
I am trying to setup saspy connection with ssh key authentication. saspy version is most recent 5.102.0. According to the instructions at https://sassoftware.github.io/saspy/configuration.html#ssh, luser and identity are defined in ssh_key dictionary in f"{user_profile}\sascfg_Windows_key.py":
below is my SASConnection class and use it to get cars data.
Below is the error. somehow, it doesn't use luser/identity pair for key authentication.
I checked your sasioiom.py code. You take host name and others with self.iomhost = cfg.get('iomhost', '') in SASconfigIOM class. but there are no such get to take luser and identity for ssh key authentication. How to make it work?
The text was updated successfully, but these errors were encountered: