Skip to main content

8 posts tagged with "ssh"

View All Tags

SSH - Autosuggestions with ZSH

3 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

SSH - Autosuggestions with ZSH

A few weeks ago, I've posted a SSH - Launch a terminal on your session without having to authenticate yourself article about the ssh command in Linux.

I'm pretty sure, like me, you are tired to use command line like ssh christophe@1.2.3.4 to start a ssh connection because ... you know, you don't need to connect on a server; no, you need to connect to the server where the application is running; you know the name of the MyAmazingApp application but certainly not the name of the server or its IP.

That's the case for me anyway.

So, I need to connect to my vault, in which I list all the information about applications, server names, credentials to be used, ...

It would be pretty cool to run ssh MyAmazingApp no?

Docker - Install and use Git in a container just like you do on your host

4 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Docker - Install and use Git in a container just like you do on your host

So, no need to tell it anymore, I'm doing everything in Docker containers even coding (since I'm coding using devcontainers) but ... till now, I was using git on my host only.

I mean, I need git on my host because I should be able to clone a repository. But the question is: should I use git from my host except for git clone? Can I work in my container and from there do actions like a git push?

My current workflow is: from my host, I'm cloning a repo on my disk then I build Docker image(s), run container(s) and jump in it (like starting my devcontainer). I start too a console in my container to start processes, work on files, ...

From time to time, I push my changes to my versioning system (like Gitlab/GitHub) and here is the point: I need to exit my devcontainer (or use another console), go back to my host and run, from my host, commands like git add . && git commit -m "feat: The great feature I'm working on it" && git push.

Let's see how to improve this process and be able to run git commands from inside our container.

Using sftp on the command line, with or without a proxy

3 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Using sftp on the command line, with or without a proxy

After my article SSH - Launch a terminal on your session without having to authenticate yourself, it was obvious that, next to the ssh and scp commands, I forgot the sftp one.

In this article, we'll explore how to start a SFTP connection to a remote server; from the command line.

In the second section, we'll also learn how to configure the sftp connection to use a proxy server.

SSH - Launch a terminal on your session without having to authenticate yourself

5 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

SSH - Launch a terminal on your session without having to authenticate yourself

Imagine that you regularly need to connect to your Linux server: you need to launch a tool such as Putty, you need to enter your login, password, etc. and carry out various operations before you can access the terminal.

If your password isn't saved in Putty's configuration, you'll have to launch another tool like a password vault; in short, it's annoying.

In this article, we'll look at how to authenticate once and for all on the server using an SSH key.

Docker secrets - Using your SSH key during the build process

9 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Docker secrets - Using your SSH key during the build process

There are plenty articles on the Internet but I didn't find the one that allowed me, without an impressive amount of trial and error, to find the solution.

So here's another article to add to the long list: how to access a private project stored at Github when creating a Docker image. In other words, the SSH key is not stored in the image. Docker will just use your key when executing the project recovery layer (the one containing the git clone instruction) and will not keep track of the key afterwards.

Docker - Configure your localhost to use SSL

12 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Docker - Configure your localhost to use SSL

In a previous article, I've explained how to run a static HTML site in seconds.

The result was a site running on your computer; using http. Let's go one step further and learn how to configure Docker to use https i.e. SSL and encryption.

In this article, you'll learn how to use Apache, nginx and PHP on your machine and be able to start https://localhost.

Fatal error was starting Putty after having saved settings

One min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Fatal error was starting Putty after having saved settings

A few days ago, I've updated my Putty configuration to set the default font-size to 12; no more 10.

Today, by starting Putty, whatever on which server I wish to join, I got the No supported authentication methods available followed by, in my case (server sent: publickey, gssapi-keyex, gssapi-with-mic, keyboard-interactive) fatal error.

I've only understand the origin of the problem by looking at the window caption: Putty tries to connect to a server other than the one I want. Why? And, ah, ok, last time I've modified my settings I was working on that server so, the solution should come from: how can I reset my Putty settings?

Github - Connect your account using SSH and start to work with git@ protocol

3 min read
Christophe
Markdown, WSL and Docker lover ~ PHP developer ~ Insatiable curious.

Github - Connect your account using SSH and start to work with git@ protocol

Using SSH instead of HTTPS to connect to Github is more secure. Indeed, SSH relies on public-key cryptography. This makes unauthorized access much harder compared to a password, which can be stolen through phishing or brute-force attacks. Also, HTTPS transmits your username and password (encrypted) over the network, which can be intercepted in a Man-in-the-Middle (MITM) attack. SSH doesn't transmit passwords after the initial setup.

Let's see how to add a SSH key and, from now, being able to work with Github like using the git@ protocol with git clone.