Bill Software Engineer
Bill Software Engineer

Reputation: 7782

In Netbeans, can you do SSH connection for PHP Projects?

Netbean is great and I use it with FTP remote connection all the time. However, one of my client currently only have a SSH connection. Is there anyway to connect to it and up/down files?

Upvotes: 20

Views: 38650

Answers (3)

CTala
CTala

Reputation: 317

I do the same as Richard.

In general is easier just to mount the remote filesystem and use netbeans in the mounted directory.

I just do the following :

sudo sshfs -o allow_other [email protected]:/var/www/html /mnt/droplet/

Upvotes: 2

Rick
Rick

Reputation: 591

I've had luck using sshfs (ssh file system) on ubuntu. I create created a mount folder in my home folder and run the following

$ sshfs domain\\user@server:/path/to/remote/folder ~/mount/local-mount-point

From there I start a new (or existing) project in Netbeans at that local folder ~/mount/local-mount-point

For a nicer set up, do a key exchange between your local box and the server (ssh-copy-id) for password-less ssh connections. Then, put the above command line in your .bashrc file.

Upvotes: 5

Jevgenij Evll
Jevgenij Evll

Reputation: 1889

Like it was mentioned, SFTP is supported in Netbeans by default. So select "remote connection" in your project's run configuration and use your SSH connection information (host, login and pass). You don't have to provide any private key file.

Upvotes: 24

Related Questions