Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote SSH/SFTP with Netbeans

I know you can set up remote connection in Netbeans or as others have suggested, mount the remote file system locally and let Netbeans read that.

This current set-up I have to SSH into a remote server and then SSH again into another one.

Is it possible in Netbeans to access the filesystem on the 2nd server hop?

like image 462
twigg Avatar asked May 19 '17 13:05

twigg


1 Answers

I think you can setup a SSH local port forwarding on your first remote server to archive what you want here. Once ssh connection established with the first server, it will be tunnel to second server. Also, will be much more convenient if using SSH public key as authentication method.

Run below command on your local (Need to keep this running)

ssh -NL 2222:server2.example.com:22 server1.example.com

Test connection with ssh locally

ssh localhost 2222

So in your case, Netbeans just need to connect to localhost port 2222.

Ref: https://www.ssh.com/ssh/tunneling/example

like image 81
Ryan Avatar answered Nov 15 '22 10:11

Ryan