How to connect to AWS server with PPK file on mac - wordpress

How do I get on an AWS server? Do I have to use terminal? Can I use transmit? I need to install Wordpress and I really don't want to do that through command line. I have a PPK file and an amazon url. I tried converting the PPK to PEM in terminal but after spending a 4 hours of updating my OS and Xcode it didn't work. Can I get the Access key and secret from the PPK file and use that in transmit?

You can get into AWS server from Mac terminal by using SSH protocol but for that you need .pem file. You can not use .ppk file on Mac OS to SSH into server. You need to have .pem file. However you can conver this .ppk file into .pem. Try following steps
Install Homebrew
ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install putty on Mac
brew install putty
Convert .ppk into .pem where key.ppk is name of your .ppk file
puttygen key.ppk -O private-openssh -o key.pem
Set the appropriate permissions to the .pem file
chmod 400 key.pem
SSH using converted .pem file
ssh -i key.pem username#hostname

Related

How to decrypt a source file in palantir-foundry?

How to decrypt a file in Palantir either while pulling the file thru SFTP sync or after receiving the file at Foundry end.
File is encrypted [symmetric (passphrase)] in a linux system using gpg utility.
Command used to decrypt the file in a linux system:
gpg --batch --passphrase <<passphrase>> --output decrypted_file.csv --decrypt encrypted_file.csv

Host key verification failed. in docker

I wanted to launch the jenkins which is installed through docker automatically in browser.. im working on windows os. in docker base os is ubuntu.. then i used solution from this link1.now im getting following error when i ssh using -v command i find that "read_passphrase: can't open /dev/tty: No such device or address"
by going through many websites i have created ssh file through windows using gitbash it contains id_rsa,id_rsa.pub,known_hosts files.
Now what should i do to launch the jenkins file in browser which is build using docker
I'm just going to address the error message you pasted for now.
ssh is trying to get keyboard input for the passphrase on your private key, but can't open the terminal correctly. Are you running the ssh command directly in the terminal, or from a script? If not, try running ssh directly. If you need to run ssh from a script:
Maybe try with keys that don't have a passphrase.
If you can use ssh-agent: Run eval $(ssh-agent), then run ssh-add and enter your passphrase. ssh will no longer prompt for a passphrase now.

How do you rsync build files from Gitlab CI to another server

It's unclear to me how to get my build files from the Gitlab CI (hosted on https://ci.gitlab.com) over to my personal server using rsync.
I have setup 1 test and 1 deploy job.
Under the deploy tab I have inputed the bash commands to:
Install rsync
Update packages
Finally, the rsync command to
transfer files over SSH to my personal server.
When I enter the SSH credentials (with verbose flag on) for my private personal server, it would appear that the SSH key is the issue. In Gitlab, I have already established the deploy key (for hooks - tested this and it works).
Where do I locate the public SSH key for the Gitlab deploy instance so that I can install that key on my server?
Below is the exact script entered in Gitlab CI deploy job script pane:
# Run as root
(
set -e
set -u
set -x
apt-get update -y
apt-get -y install rsync
)
git clone https://github.com/bla/deployments.git $HOME/deploy/deployments
SVR_WEB1_WEBSERVER="000.11.22.333"
USER1="franklin"
GROUP1="team1"
FROM_DIR="/gitlab-ci-runner/tmp/builds/myrepo-1/"
DEST1="subdomains/gitlab/myrepo"
EXCLUSIONS_LIST="${HOME}/deploy/deployments/exclusions/exclusions.txt"
ssh -v "$USER1#$SVR_WEB1_WEBSERVER"
/usr/bin/rsync -avzh --progress --delete -e ssh --group=$GROUP1 -p --exclude-from "$EXCLUSIONS_LIST" "$FROM_DIR" "$USER1#$SVR_WEB1_WEBSERVER:$DEST1"
Providing your private ssh key is dangerous unless you use your own gitlab-ci runners for deployment. That's why it is better to use rsync modules.

Is there a way to automatically upload changed files to a server

Is there a Unix command, or set of commands, which will set up a watch on a local folder and automatically upload changed files to a web server. I use Sublime with SFTP at home which does this beautifully, but at work I can't install Sublime although I can SSH, FTP etc with Terminal on their Mac.
Have a look at rsync over FTP from here http://www.cyberciti.biz/faq/howto-linux-unix-bsd-appleosx-using-rsync-with-ftp-server/
entr runs arbitrary commands when files change.
It can be installed on Mac OS X via homebrew
$ brew install entr
Example:
$ find /path/to/my/repo | entr echo "Something changed"
Just substitute echo "Something changed" with your FTP uploader of choice.
The syntax for lftp would be something like this:
$ lftp -e "mirror -R {local dir} {remote dir}" -u {username},{password} {host}

Transfer Directory structure from Windows to AIX server

I have to transfer a folder structure from Windows to AIX server but I can not install anything more then Putty as this is client machine.
I have tried few alternative.
Tried to ftp Directory structure which is not possible as FTP support only simple file transfer
Tried to execute remote UNIX command execution with putty.exe -ssh -l username -pw password cmd_file.sh. cmd_file.sh is in local windows system contains shell commands but unzip not supported here. I also tried putty.exe -ssh -l username -pw password unix_command and got error "invalid port number"
I tried to execute a shell script file in unix server from windows, it didn't work either.
Make a tar file (using cygwin perhaps on Windows -- you do use cygwin, right?). Then ftp the tarball over. Untar, profit!

Resources