How to set a remote django develop environment? - django

I have to set a development environment on a ubuntu machine(16.04).
It's django+postgresql+Nginx, I.think I could install all these things together on that machine,but I totally don't have any idea about how to connect it by using pycharm running on my pc, and how to manipulate the database.
Is there anyone could tell me how to connect it. This is the first time I have to use a remote machine.
By the way, my pc and ubuntu machine are in the same LAN, but there is another person who were asked to write db are not.
I hope I could get some suggestions from the community.

One of the best and common way is to use SSH.
Here you can find an official guide on how to enable SSH server on Ubuntu 16.04
You can use Putty to connect from Windows PC to your SSH server or if you're using Mac or Linux, there should be already installed SSH client. So, just ssh username#servername

Use SSH. Assuming you're on Linux, open a terminal and type:
ssh username#local-ip-address-of-machine
and then type your password when prompted. Your terminal window essentially acts as a terminal on your remote machine. From here, I suggest you research Docker in order to set up a custom environment for your Django project. I have only told you how to connect since that's your question, and there are plenty of tutorials on setting up Django and Docker. If the other person wants to connect, you will need to port forward on your router port 22 on the local IP of the machine.
If you haven't got SSH set up, this page tells you how.

Related

Problem connecting via SSH from Windows to AWS Linux Instance [Permission denied; (publickey,gssapi-keyex,gssapi-with-mic)]

I launched an instance & downloaded my secret key. I've attempted this on 2 different devices and instances. Im trying to connect to the instance so I can upload files. Whenever I attempt to connect, this permission denied message displays.
Note I've downloaded and used openSSH
PS C:\WINDOWS\system32> ssh -i C:\Users*\Downloads*key.pem #ec2----.us-west-2.compute.amazonaws.com
The authenticity of host 'ec2----.us-west-2.compute.amazonaws.com (...)' can't be established.
ECDSA key fingerprint is SHA256:.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ec2----.us-west-2.compute.amazonaws.com,...' (ECDSA) to the list of known hosts.
*#ec2----**.us-west-2.compute.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
PS C:\WINDOWS\system32>
P.S. This is my first post, so constructive criticism on etiquette is welcome :)
Recently started my first job (an internship really) in the IT field. 3 months ago working for a start-up. Im hoping to migrate eventually to something in the field of cloud security, OSINT, DevSecOps, Web Development. Passionate about information security, open source software.
I followed this tutorial from amazon on how to connect to my instance
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/openssh.html
Looks like it's an issue with .pem file permissions. Check this video & see if you can resolve the error.
You can use puttygen to get ppk file which is helpful to SSH from windows.
If you want to use .pem files, mobaxterm is good software to use
You are very welcome to the community, it's nice to know you started your first Job!
To get you started on how to connect to the AWS Linux instance there is a nice KB article Connect to your Linux instance from Windows using Windows Subsystem for Linux and another one using putty look at here & another SO thread.
There are a few thing you need to learn as Prerequisites:
Verify that the instance is ready
Verify the general prerequisites for connecting to your instance
Install the Windows Subsystem for Linux (WSL) and a Linux distribution on your local computer
Copy the private key from Windows to WSL
Then use :
ssh -i /path/key-pair-name.pem instance-user-name#instance-public-dns-name
OR
ssh -i /path/key-pair-name.pem instance-user-name#instance-IPv6-address
From using your Windows CMD:
PS C:\WINDOWS\system32> ssh -i C:\Users\<user_name>\Downloads\testkey.pem ec2-user#ec2----.us-west-2.compute.amazonaws.com
OR
PS C:\WINDOWS\system32> ssh -i C:\Users\<user_name>\Downloads\testkey.pem ec2-user#<Some_IP_Address>
Better Use mobaexterm and copy user key in there and you will there:

Key not present on Coral Dev Board when configuring MDT with macOS host machine

I am currently following the Coral Dev Board configuration guide using a MacOS machine running Catalina as my host machine. As per the instructions, for me to use the MDT command line tools on my specific host machine I must manually configure mdt. I used the following guide step-by-step but end up with the following error when I try to connect to the board.
Waiting for a device...
Connecting to jumbo-goose at 192.168.0.78
Key not present on jumbo-goose -- pushing
It looks like you're trying to connect to a device that isn't connected
to your workstation via USB and doesn't have the SSH key this MDT generated.
To connect with `mdt shell` you will need to first connect to your device
ONLY via USB.
Cowardly refusing to attempt to push a key to a public machine.
I would greatly appreciate if someone would be able to assist me in debugging this issue. I have reflashed my device a few times so I am unsure where the issue is emerging.
On the Coral Dev Mini I had similar issues with generating ssh keys, especially when I switched from a Windows to Linux machine. The easiest was (though not as secure) is to follow these steps and allows ssh with a password. First you will need to connect with a USB cable.
https://serverpilot.io/docs/how-to-enable-ssh-password-authentication/
To edit use sudo nano /etc/ssh/sshd_config
The key is to set: PasswordAuthentication yes
Check the sha25sum of the key file transferred to the dev board is the same as on MacOS, mine didn't match i.e the cut and paste wasn't quite right. With key file transferred manually using a SD card it worked first time on mdt devices/mdt shell commands.

Connect to teradata dabase from host running on virtual machine

I have installed teradata express VMware (Linux). Able to connect to database using bteq and sql assistant located inside VM.
But i need to install the Informatica in my host Windows and access the teradata database in Linux VM.
Is that possible? Please help me on how to do that?
I am running the same in VMWare and this is what I have done. Install SQLA on your host and configure your VM Guest to use Bridged networking. Then in your Host machine open SQLA and try to connect to hyperjcop1. It should work and should connect to your Guest TD express instance. You can then install Informatica and configure that connection as you would in any other Informatica instance.
That is all I needed to do, hope it helps you out. If it doesn't work as I described you could try adding an entry to your hosts file on the Host machine as Rob Paller mentions.
If that fails come back and post your errors or more detail about what you have tried.

Running Python GUI apps on C9.io

Does anyone know if it is possible to run python-gui apps, like wxPython, on a c9.io remote server? I have my home server set up with c9 via SSH, and no issues logging in and running apps in the terminal on the VM. However, when I try to run GUI apps, I get the following error message.
Unable to access the X Display, is $DISPLAY set properly?
After searching and searching, I can't seem to find a guide or anything in the docs that detail how to set $DISPLAY in the script. X display is installed and active on my server, but I don't know how to configure the c9 script to access it properly. Any assistance would be appreciated!
I don't know if Cloud9 supports it but normally to run a remote GUI application you would have ssh forward the X11 communication over the ssh connection via a tunnel. So basically the application is running on the remote system and it is communicating with a local X11 server which provides you with the display and handling of the mouse and keyboard.
If you run ssh with the -X parameter then it will attempt to set up the X11 tunnel and set $DISPLAY in the remote shell so any GUI applications you run there will know how to connect to the X11 tunnel. Bw aware however that this is something that can be turned off on the remote end, so ultimately it is up to Cloud9 whether they will allow you to do this.

Unable to access puppet enterprise web console

Hi I am beginner to puppet. I have setup learning puppet VM with virtual box 4.3.7 on win 7. Other puppet commands are running properly, but I am unable to access Puppet enterprise web console.
I have tried it using "https://ip_address_of_vm" on a web browser on win 7. I have tried to ping that ip address on command prompt, still its not connecting to it.
What should I do? Any kind of help is appreciable.
Make sure that the NIC is set to 'bridged' mode in VMWare/Virtualbox.
Also, can you ping the ipaddress?
To get mine to work, I changed my VirtualBox VM network settings to 'Host-only Adapter'.
facter ipaddress then returned a working IP.
I am running OSX 10.8.5 and VirtualBox 4.3.8