-
Notifications
You must be signed in to change notification settings - Fork 292
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
Changing User on Remote Machine #690
Comments
Same problem. I've tried to configure |
Any new info on this? |
6 similar comments
Any new info on this? |
Any new info on this? |
Any new info on this? |
Any new info on this? |
Any new info on this? |
Any new info on this? |
@roblourens Any new info on this ? |
I also get this issue. I notice that Windows Remote Desktop won't remember me when I tick the box, maybe it's related? |
i can only via ec2-user to ssh aws ec2 .then i need to change user to root for remaining work.but vs code just can not refresh current work folder to user root.please add this function in the future. |
If
All good? Now go change the |
I tried this and unfortunately does not work. An error is thrown during login citing the need to run su from a terminal. |
Has once solution, a bit curious. Performed on Centos7 server, with user on the sudoers list. BE CAREFULL, this will ALWAYS redirect you to the another user. Create or edit the file
Save the file and reload VSCode window. |
Doesn't work for me. VSCode will just hang in the connecting state if I try to do this. Tested on RHEL 7. |
I wonder if this gets the attention it needs. Currently, this is a showstopper. It makes the ssh-remote plugin UI integration useless if one is using security best practise and seperates the application execution user - with limited permissions - from the actual ssh users. |
I do this as a workaround to run vscode as root but not ssh as root: After login via vscode-remote-ssh for the first time (vscode-server will gets installed), run these in the integrated terminal: ctrl + ` make node run as root sed -i "/node/s/^/sudo /" ~/.vscode-server/bin/*/server.sh Restart remote vscode pkill -f vscode |
@arashilmg It works for me. |
None of these are working for me to connect to Cent7. |
@arashilmg Thank you, it works.
|
Any updates on this? We're using a special user in combination with our |
@eleanorjboyd I tried it. but it does not work. I think that you should tell it to listen and prompt to the user when a value like a password is needed (for the RemoteCommand). it will ask you for password for the first ssh connection but it will not work with the |
Hello! This looks to be the same issue in this issue. Please reference this issue for tips on how you might get around this and this is where any updates will be given on the ongoing issue. |
No, it has nothing to do with #1688. In #1688 people want to be able to create and modify files if the remote user has |
I had to go one step further and apply it to code-server file: so in theory should just |
@ecoop3r that works .. but for example we dont even have a sudo group for security reasons |
my solution was to permit ssh connection to root only from the local machine in the sshd config file .. so I connect as a normal user and then ssh to the root and use sshpass package in the ssh config file command property to set the password in the same ssh command |
Something that should be so easy because ssh is around forever, cannot be figured out by Microsoft? |
Any update on this? For security reason, I can only switch user with |
no, They didn't do anything yet |
Will this work if
My
I do see a password prompt in VS Code terminal but it's non-interactive and I receive no prompt for a password where I can type it in. After 10 seconds or so, the terminal says "su: Authentication failure" and I end up with:
Thanks! |
@roblourens regarding the question above. Thanks! |
hi @eleanorjboyd .. how are you? |
My problem: I've used #690 (comment) instructions for 1 year+ (thank you @sewan-aprodhomme!!). I received a Windows update and Remote-SSH with My Environment:
Any suggestions for a fix or how I might troubleshoot? Thank you! |
Hi @eleanorjboyd & @roblourens, related to the previous post, would either of you be able/willing to post a few comments about how one might troubleshoot Remote-ssh with local server enabled and a RemoteCommand to switch user? |
This seems to work, Version: 1.81.1.
With |
I added a solution to this problem here! It is clean, doesn't require an extension, and just works. |
plus the target host has to be removed from |
Additionally, I had to remove the target host entries from |
Echoing @519seven, I also cannot get this to work where
Results:
Variations tried:
It seems like this just fails if a password is required unless I have somehow missed something here. RemoteCommands that aren't prompted for a password will work. |
But did you try |
Hello! Putting |
Hi @danielfleischer ,
Yes, I did. Same result as Does your user 'dan' in your example on Aug 28 require a password to assume the elevated role? I can't use sudo passwordless, and I suspect that's the hitch on my end. Pretty sure that if I could set the command passwordless, it would work. Unfortunately, that's not in the cards for me security-wise. |
Experiencing a similar problem. After connecting to EC2, added a new user "steam", but can't access the home folder. Terminal shows
After adding a new user, installing and running the application, a Steam folder is generated in Additionally, I believe the remote Windows setup should incorporate these functions. Another issue exists regarding the following:
|
My problem: On my remote host I have my personal user and users that can only edit specific projects. Only my personal user is configured to be accessible directly with SSH. Usually, when I have to work on source code directly on the machine, I connect via SSH, change my user to the project user and edit the code with VIM. It seems that this workflow is currently not possible with this extension.
Is it possible to change the user after connecting? So I can connect with my personal account, switch user to the one I want (which has no SSH keys but has the permissions to edit certain files) and open the files as that user.
The text was updated successfully, but these errors were encountered: