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

How to connect to my school server over SFTP? #44

Closed
AndreJNguyen opened this issue Apr 6, 2016 · 8 comments
Closed

How to connect to my school server over SFTP? #44

AndreJNguyen opened this issue Apr 6, 2016 · 8 comments

Comments

@AndreJNguyen
Copy link

So I've used Notepad++ and it's ftp plugin for the past few years but I really like Code and want to use it permanently. I've never learned how to generate private keys, so I was hoping someone could point me to the right direction to easily use ftp-sync to my school's servers (Linux).

With Npp's ftp plugin, I just put in my credentials and the program will ask me to authenticate the host key upon first connection.

I know I need to specify a privateKeyPath in the config file but not really sure how to do that since Npp did all the sftp authentication for me.

Could someone guide me in the right direction? Right now, I just edit everything in Code and use Npp to upload it. Thanks.

@mattrat
Copy link

mattrat commented Apr 6, 2016

If you are using Windows, I recommend PuTTYgen. You can create a password protected key pair or a open key pair. Then you can use Pageant and PuTTY together to ssh into your servers without having to re-enter you passphrase over and over.
If you are weary of download sites like me, I suggest Ninite.

@mattrat
Copy link

mattrat commented Apr 6, 2016

If you are using Linux it's a little less gui. Here are good set of instructions that I have used a couple times when I forget.

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

https://help.ubuntu.com/community/SSH/OpenSSH/Keys

@AndreJNguyen
Copy link
Author

Thanks mattrat.

So I generated a key using PuTTYgen, then placed the public key on the Linux server in the .ssh folder. I then put the private key in the proper path in Windows and then tried to run ftp-sync but it just hangs saying "sync prepare in progress..." Did I do something wrong?

@mattrat
Copy link

mattrat commented Apr 7, 2016

Glad I could help.

The short answer is maybe. Did you create a password protected key pair?

I think this package only supports non-password protected keys. I create an issue for this and hope to help fix it. I would love to be wrong and have someone here correct me though. I have been trying to, in my very limited time, troubleshoot and see if its true. I have seen other people say they got it to work with and open key pair. Unfortunately I don't want to use non-password protect method.

If it's not password protected, try opening a terminal connection to your remote server. I also use Sublime Text 3 and am hoping to switch to VSCode full time, once it's matured. I use my key pair in Sublime to test it.

@AndreJNguyen
Copy link
Author

I tried both a password protected key pair and non-password-protected and still had no luck. I'm just going to guess that there are issues with some connections. It's a real bummer because I love Code and want to be able to use it without having to FTP with Notepad++. Thanks for your help though!

@mattrat
Copy link

mattrat commented Apr 11, 2016

You're welcome. I also really enjoy Code. Hopefully there is a fix soon or I find time to find a fix and create a pull.

@AndreJNguyen
Copy link
Author

Just an update: I finally got ftp-sync to work after weeks of trying.....

.... I was accidentally using port 21... I'm not sure why I didn't think of that, such a bad mistake by me. I'm not sure if that was the only mistake I made since I tried so many different ways to generate a key. I finally just stared at the json and realized that since I was using sftp I needed to use port 22. Ugh.

So I can finally use sftp with Code and it's glorious. I used an open key pair also, so it doesn't really solve your problem, mattrat. Thanks for your help with those links though!

@mattrat
Copy link

mattrat commented Apr 19, 2016

I'm glad you got it got it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants