Skip to content
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

Support for Remote SAS 9.4 #61

Closed
gowerc opened this issue Dec 16, 2022 · 23 comments
Closed

Support for Remote SAS 9.4 #61

gowerc opened this issue Dec 16, 2022 · 23 comments
Labels
testing-complete Complete the pull requests testing

Comments

@gowerc
Copy link

gowerc commented Dec 16, 2022

Is your feature request related to a problem? Please describe.

My company/department currently has licensed SAS9.4. We work on a server that we SSH into and then use the terminal sas command to run programs. This extension doesn't appear to currently have any support for this way of working. Current work around is just to open a sas interactive session via sas --nodms and have a keyboard shortcut for submitting commands to the terminal however it would be great if this way of working + sas9.4 could have formal support.

Describe the solution you'd like
Integration with local sas + sas9.4.

@gowerc gowerc changed the title [Feature] Local SAS / SAS 9.4 Support [Feature] Support for local SAS / SAS 9.4 Dec 16, 2022
@2TomLi 2TomLi changed the title [Feature] Support for local SAS / SAS 9.4 Support for local SAS / SAS 9.4 Dec 19, 2022
@smorrisj smorrisj changed the title Support for local SAS / SAS 9.4 Support for Remote SAS 9.4 Mar 3, 2023
@smorrisj
Copy link
Contributor

smorrisj commented Mar 3, 2023

We're going to repurpose this issue to specifically target SAS 9.4 Remote Support implementation and testing of PR #134. We'll use #11 for adding support to target a local SAS installation. Thanks for logging this issue!

@smorrisj
Copy link
Contributor

smorrisj commented Mar 3, 2023

@Sonny-W would it be possible to assign this out for verification?

@Sonny-W Sonny-W assigned Becky-Williamson and unassigned Sonny-W Mar 6, 2023
@Becky-Williamson Becky-Williamson added testing Test the pull requests and removed verification-needed testing Test the pull requests labels Mar 7, 2023
@Becky-Williamson Becky-Williamson removed their assignment Mar 8, 2023
@Becky-Williamson
Copy link

Tested the following scenarios:

  • Create 9.4 ssh profile using VSC prompts
  • Create 9.4 ssh profile manually in json
  • Run SAS code connected to 9.4
  • Switching between ssh and viya profiles
  • Verify that Explorer pane is not displayed in when connected to 9.4
  • Verify that SYSTEM options can be defined in profile

@Becky-Williamson Becky-Williamson added the testing-complete Complete the pull requests testing label Mar 8, 2023
@gowerc
Copy link
Author

gowerc commented Mar 8, 2023

Hey @Becky-Williamson & @smorrisj , Just wanted to say that when I tried testing this feature it looks like it doesn't work if the ssh address requires a proxy. At least within our company the main server requires a proxy entry point i.e. we have the following in our ~/.ssh/config files:

Host <ssh-server>
	User gowerc
	IdentityFile ~/.ssh/id_rsa
	ProxyCommand ssh -W %h:%p gowerc@<proxy-server>

If I just enter <ssh-server> into your host config setting it fails with error message:

getaddrinfo ENOTFOUND <ssh-server>

Source: SAS (Extension)

EDIT: Just to add encase it wasn't completely clear I've used <ssh-server> instead of the real server address as I'm not sure if I'm allowed to post the addresses publicly :)

@gowerc
Copy link
Author

gowerc commented Mar 9, 2023

Hi @Becky-Williamson & @smorrisj ,

Testing this against a different server that doesn't need a proxy it appears that the connection / state does not persist e.g.

If I submit:

data test;
    set sashelp.iris;
run;

NOTE: There were 150 observations read from the data set SASHELP.IRIS.
NOTE: The data set WORK.TEST has 150 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

However if I then submit the following on the same connection:

data test2;
    set test;
run;

ERROR: File WORK.TEST.DATA does not exist.

I'm afraid that the functionality isn't overly useful to my team if it can only handle batch (complete program) submissions :(. At least not in how we currently work / use SAS. Would the local sas feature being developed for #11 also have these same limitations ?

@smorrisj
Copy link
Contributor

smorrisj commented Mar 9, 2023

Hey @Becky-Williamson & @smorrisj , Just wanted to say that when I tried testing this feature it looks like it doesn't work if the ssh address requires a proxy. At least within our company the main server requires a proxy entry point i.e. we have the following in our ~/.ssh/config files:

@gowerc thanks for testing this out. We can look into implementing support for a jump connection. If it's agreeable could we possibly track this feature in a separate issue?

@smorrisj
Copy link
Contributor

smorrisj commented Mar 9, 2023

I'm afraid that the functionality isn't overly useful to my team if it can only handle batch (complete program) submissions :(. At least not in how we currently work / use SAS. Would the local sas feature being developed for #11 also have these same limitations ?

@gowerc thanks for reporting. It seems like there is possibly a bug in how the session is being handled where the work tables are not persisting. I can look into this and report back.

@smorrisj
Copy link
Contributor

smorrisj commented Mar 9, 2023

When I dump out the work directories in between the two runs on the same connection, I'm seeing two different directory names in /tmp.

When I look at the run command, it's calling setup and run functions on the session every time the run button is pressed. The problem here is that for the ssh connection provider the setup function essentially reconnects to the server and starts up sas again in -nodms mode.

I think that the desired functionality we want is for it to behave closer to how interactive line mode behaves, meaning that we invoke sas once, perform 1-n commands and then exit when the close button is pressed.

@smorrisj
Copy link
Contributor

smorrisj commented Mar 9, 2023

Bug logged for the session issue on #155

@gowerc
Copy link
Author

gowerc commented Mar 10, 2023

@gowerc thanks for testing this out. We can look into implementing support for a jump connection. If it's agreeable could we possibly track this feature in a separate issue?

Yup am happy for this to be a separate issue, do you want me to create it ?

@HwangWonYoung
Copy link

Tested the following scenarios:

  • Create 9.4 ssh profile using VSC prompts
  • Create 9.4 ssh profile manually in json
  • Run SAS code connected to 9.4
  • Switching between ssh and viya profiles
  • Verify that Explorer pane is not displayed in when connected to 9.4
  • Verify that SYSTEM options can be defined in profile

Can I get an example of creating 9.4 ssh profile in detail?

@Becky-Williamson
Copy link

@HwangWonYoung, information on creating the 9.3 ssh profile can be found in the Details tab for the SAS Extension.

@HwangWonYoung
Copy link

HwangWonYoung commented Mar 31, 2023

@Becky-Williamson
Thanks for quick reply!
Is it possible using this extension when using SAS Connect over TCP/IP without SSH?

@cjdinger
Copy link
Member

@HwangWonYoung SAS/CONNECT allows one SAS session to connect and exchange data/code/results with another SAS session. So this extension still needs to connect to a SAS session using one of the supported methods (like ssh), and then that SAS session could connect to another SAS session via rsubmit and other traditional SAS/CONNECT methods.

@smorrisj
Copy link
Contributor

Yup am happy for this to be a separate issue, do you want me to create it ?

@gowerc apologies for the delay. That would be great. Thanks!

@HwangWonYoung
Copy link

@cjdinger Hi, I'm trying to set up this extension using visx file because my sas is in offline environment. I downloaded file at this url(https://marketplace.visualstudio.com/items?itemName=SAS.sas-lsp), but it doesn't seem it reflects this feature(support for remote sas). Can you please check if the latest version is uploaded? Thank you in advance.

@smorrisj smorrisj added this to the 0.1.3 milestone Apr 3, 2023
@GaryLiuTelus
Copy link

Just tested and could not connect to the remote server, and got below error when submitting SAS script:

SSH_AUTH_SOCK not set, Check Environment Variables.

My Environment:

OS: Window 10
Remote server in within VPN

Extension settings:
image

Any suggestions? What value I should assign to SSH_AUTH_SOCK system variable?

@smorrisj
Copy link
Contributor

Hi @GaryLiuTelus, see #202 for how to set this up to run on windows.

@gro1m
Copy link

gro1m commented May 1, 2023

@gowerc thanks for testing this out. We can look into implementing support for a jump connection. If it's agreeable could we possibly track this feature in a separate issue?

Yup am happy for this to be a separate issue, do you want me to create it ?

@gowerc Did you create an issue for this or did you find another way?

@shenzj1994
Copy link

Hi @smorrisj , I am having the same issue as @GaryLiuTelus and we use username and password to authenticate SSH with the server.
Do we have support for this type of authentication?

@smorrisj
Copy link
Contributor

@shenzj1994 currently we only support password-less authentication using public and private key pair where the private key is registered with the ssh-agent.

@smorrisj
Copy link
Contributor

Hi @smorrisj , I am having the same issue as @GaryLiuTelus and we use username and password to authenticate SSH with the server.
Do we have support for this type of authentication?

@shenzj1994 if it's agreeable do you mind logging an issue for this? We may be able to use the extension api's secret storage facility to securely support a username/password type auth.

@scnwwu
Copy link
Member

scnwwu commented Sep 11, 2023

Additional requests tracked in separated issues, closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing-complete Complete the pull requests testing
Projects
None yet
Development

No branches or pull requests