#sshcommander
Explore tagged Tumblr posts
Text
ASUS RT-AC88U sous Asuswrt, compagnon idéal de votre domotique
ASUS RT-AC88U sous Asuswrt, compagnon idéal de votre domotique
En France, on a l’avantage d’avoir nos box ADSL qui sont de vraies couteaux suisses. Mais cela veut aussi dire que si l’on change de FAI, on refait son réseau. Ou bien par exemple qu’on ne peut pas tout gérer sur son routeur. Cela fait quelques années que j’étais équipé d’un Netgear passé sous OpenWRT. Et là depuis 6 mois, c’est un Asus RT-AC88Uqui a pris le relais, fourni sous Asuswrt. Car…
View On WordPress
0 notes
Text
We are going to cover 12 basic SSH commands that you can use. By learning them, you will understand how to navigate and manage your VPS or server using the command line. Here are some basic SSH commands: ssh: To connect to a remote server via SSH, use thefollowing command: cssCopy code ssh username@hostname Replace username with your username on the remote server and hostname with the IP address or domain name of the server. exit: To disconnect from an SSH session and return to your local machine, you can use the following command: bashCopy code exit pwd: To display the current working directory on the remote-server, use the pwd command. It shows you the directory you are currently located in. bashCopy code pwd ls: To list the files and directories in the current directory on the remote server, use the ls command. bashCopy code ls cd: To change your current directory on the remote server, use the cd command followed by the directory path. bashCopy code cd /path/to/directory mkdir: To create a new directory on the remote server, you can use the mkdir command followed by the directory name. arduinoCopy code mkdir directory_name rm: To remove a file on the remote server, you can use the rm command followed by the file name. bashCopy code rm filename rmdir: To remove an empty directory on the remote server, use the rmdir command followed by the directory name. arduinoCopy code rmdir directory_name cp: To copy a file from one location to another on the remote server, use the cp command followed by the source file and destination path. bashCopy code cp source_file destination_path mv: To move or rename the file on the remote server, you can use the mv command followed by the source file and destination path. bashCopy code mv source_file destination_path chmod: To change the permissions of a file or directory on the remote server, use the chmod command followed by the desired permission code and the file or directoryname. bashCopy code chmod permissions filename cat: To display the contents of a file on the remote server, you can use the cat command followed by the file name. bashCopy code cat filename These are just a few examples of basic SSHcommands. There are many more commands available depending on your specific needs and the capabilities of the remote server.
0 notes
Text
Dokku is an extensible, open source Platform as a Service that runs on a single server of your choice. If you ever used Heroku, then think of it as your hosted version of Heroku. You can have docker based Platform as a Service running on a single server. In this guide, we will cover the installation of Dokku PaaS on Ubuntu 20.04|18.04 Linux System. As of this article update the supported operating systems are: Ubuntu 16.04/18.04/20.04 x64 Debian 9+ x64 With CentOS 7 still experimental Installing Dokku on Ubuntu – Pre-requisites Installed and updated Ubuntu 20.04|18.04 system Docker Engine At least 1GB of system memory Server with FQDN set – Can be on DNS or /etc/hosts There are two ways of installing Dokku on Ubuntu 20.0418.04: Using bootstrap script Installing from Dokku apt repository We will consider both methods to install Dokku on Ubuntu 20.04|18.04 Linux server. I recommend installing Dokku from the apt repository so that you can have a view of what’s happening. Set system hostname using the hostnamectl command: $ sudo hostamectl set-hostname dokku.computingforgeeks.com Ensure your system is updated and upgraded: sudo apt update sudo apt upgrade -y sudo reboot Method 1: Install Dokku on Ubuntu 20.04|18.04 from apt repository Dokku packages are available on packagecloud.io dokku repository. Start by importing repository GPG key to trust packages: sudo apt update sudo apt install -y apt-transport-https wget -nv -O - https://packagecloud.io/dokku/dokku/gpgkey | sudo apt-key add - Key importation output: 2020-10-08 19:40:09 URL:https://d28dx6y1hfq314.cloudfront.net/505/623/gpg/dokku-dokku-FB2B6AA421CD193F.pub.gpg?t=1602179109_89e21c60fdf77e8ab2181ba23ae0dc910985dfbb [3937/3937] -> "-" [1] OK Add the repo using the commands below: OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")" echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ $OS_ID main" | sudo tee /etc/apt/sources.list.d/dokku.list Then update system package list: sudo apt update Step 1: Install Docker Engine on Ubuntu 20.04|18.04 You can install either stable release of Docker or edge release, both are supported by Dokku. wget -nv -O - https://get.docker.com/ | sudo bash - Add your user account to docker group: sudo usermod -aG docker $USER newgrp docker This is unattended installation, wait for it to complete then confirm docker engine version installed: $ docker version Client: Docker Engine - Community Version: 19.03.13 API version: 1.40 Go version: go1.13.15 Git commit: 4484c46d9d Built: Wed Sep 16 17:02:52 2020 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.13 API version: 1.40 (minimum version 1.12) Go version: go1.13.15 Git commit: 4484c46d9d Built: Wed Sep 16 17:01:20 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.3.7 GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683 Step 2: Install Dokku on Ubuntu 20.04|18.04 Once docker has been installed, you can proceed to install Dokku on your Ubuntu 20.04|18.04 LTS system. This is done by updating system packages and installing dokku package: sudo apt update sudo apt install dokku -y Dependencies installed through apt include: herokuish sshcommand plugn When asked whether to enable web configuration interface, answer yes Installation of dokku will also configure nginx for you and create a systemd service unit for managing the service. Installation output summary is shown below: .... Adding user dokku to group adm Starting nginx (via systemctl): nginx.service. -----> Priming bash-completion cache
Ensure proper sshcommand path Setting up dokku-installer Enabling dokku-installer Created symlink /etc/systemd/system/multi-user.target.wants/dokku-installer.service → /etc/systemd/system/dokku-installer.service. Created symlink /etc/systemd/system/graphical.target.wants/dokku-installer.service → /etc/systemd/system/dokku-installer.service. Starting dokku-installer Processing triggers for libc-bin (2.31-0ubuntu9.1) ... Processing triggers for ufw (0.36-6) ... Processing triggers for systemd (245.4-4ubuntu3.2) ... Processing triggers for man-db (2.9.1-1) ... Install dokku dependencies: sudo dokku plugin:install-dependencies --core A user and group named dokku is also added to the system, its home directory is /home/dokku. This user account is used when deploying applications to Dokku. $ id dokku uid=1001(dokku) gid=1002(dokku) groups=1002(dokku),4(adm),998(docker) $ ls -la /home/dokku/ total 44 drwxr-xr-x 5 dokku dokku 4096 Oct 8 19:45 . drwxr-xr-x 4 root root 4096 Oct 8 19:43 .. drwxr-xr-x 2 dokku dokku 4096 Oct 8 19:45 .basher -rw-r--r-- 1 dokku dokku 220 Oct 8 19:43 .bash_logout -rw-r--r-- 1 dokku dokku 3771 Oct 8 19:43 .bashrc -rw-r--r-- 1 dokku dokku 0 Oct 8 19:43 .cloud-locale-test.skip drwxr-xr-x 2 dokku dokku 4096 Oct 8 19:43 .dokkurc -rw-r--r-- 1 dokku dokku 29 Oct 8 19:43 HOSTNAME -rw-r--r-- 1 dokku dokku 807 Oct 8 19:43 .profile drwxr-xr-x 2 dokku dokku 4096 Oct 8 19:43 .ssh -rw-r--r-- 1 dokku root 15 Oct 8 19:44 .sshcommand -rw-r--r-- 1 dokku dokku 29 Oct 8 19:43 VHOST The service should be running by default after the installation. The name of the service is dokku-installer.service: $ systemctl status dokku-installer.service ● dokku-installer.service - Dokku web-installer Loaded: loaded (/etc/systemd/system/dokku-installer.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-10-08 19:44:41 CEST; 6min ago Main PID: 14789 (python3) Tasks: 1 (limit: 2286) Memory: 8.3M CGroup: /system.slice/dokku-installer.service └─14789 python3 /usr/share/dokku/contrib/dokku-installer.py selfdestruct Oct 08 19:44:41 ubuntu systemd[1]: Started Dokku web-installer. Oct 08 19:44:41 ubuntu sudo[14817]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/ufw status Oct 08 19:44:41 ubuntu sudo[14817]: pam_unix(sudo:session): session opened for user root by (uid=0) Oct 08 19:44:41 ubuntu sudo[14817]: pam_unix(sudo:session): session closed for user root Confirm if the service is enabled to start on boot: $ systemctl is-enabled dokku-installer.service enabled Dokku version can be checked using: $ dokku version dokku version 0.21.4 Step 3: Configure Dokku on Ubuntu 20.04|18.04 When done with the installation, go to your server’s IP and follow the web installer to configure Dokku. Confirm: SSH Public key that you’ll use to access Dokku apps. Provide FQDN hostname for dokku to be used for apps URL Check Use virtualhost naming to have your apps deployed on Dokku with hostnames Then click “Finish Setup” button to finish Installation of Dokku on Ubuntu 20.04|18.04. Note that Once you save your settings, the web admin will self-terminate and you should be able to run or deploy to the Dokku installation. Upgrading Dokku on Ubuntu 20.04|18.04 To upgrade Dokku to the latest stable release, use dokku-update command: sudo dokku ps:stopall sudo apt update sudo apt install -qq -y dokku herokuish sshcommand plugn gliderlabs-sigil sudo sudo apt upgrade Upgrading Dokku with above command will not affect the running dokku and automates many of the upgrade instructions for you. If you would like to rebuild all applications after the upgrade, use: sudo dokku ps:rebuildall Installing Dokku Plugins Dokku provides a handful of Plugins to manage other functionalities. All are available on Dokku has official plugins. Installation of these plugins is done on the Dokku host as a root user or using a user account with sudo privileges.
See examples below: Install PostgreSQL datastore service: sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git Install MariaDB datastore plugin: sudo dokku plugin:install https://github.com/dokku/dokku-mariadb.git mariadb Deploying Apps to Dokku Now that you have a working Dokku installation on your Ubuntu 20.04|18.04 system, you can begin deployment of applications. You can read a comprehensive guide on deploying apps to Dokku. Conclusion Dokku is a free and open-source Docker-based PaaS that allows you to basically do the same things as Heroku on your own infrastructure (on-premises or cloud). It is easy to setup and use. If you have any challenges with the installation and configuration, let me know through the comment section.
0 notes
Text
Add multiple git ssh/account
sshCommand = ssh -i ~/.ssh/id_call-levels
0 notes
Text
Crear y ejecutar un script de PowerShell en Linux realizando una conexión SSH desde PowerShell en Windows
Crear y ejecutar un script de PowerShell en Linux realizando una conexión SSH desde PowerShell en Windows
New-SSHSession -ComputerName 192.168.1.162 -Credential (Get-Credential) Invoke-SSHCommand -Index 0 'echo "echo hola" > script2.ps1' Invoke-SSHCommand -Index 0 "cat script2.ps1" Invoke-SSHCommand -Index 0 "powershell script2.ps1"
View On WordPress
1 note
·
View note
Text
Git Identity Manager - Gitのアカウント情報を切り替え
from http://www.moongift.jp/2018/06/git-identity-manager-git%e3%81%ae%e3%82%a2%e3%82%ab%e3%82%a6%e3%83%b3%e3%83%88%e6%83%85%e5%a0%b1%e3%82%92%e5%88%87%e3%82%8a%e6%9b%bf%e3%81%88/
Gitではユーザ名とメールアドレ��などを設定として保存しておきます。しかし、企業と個人でアカウントを切り替えている人にとっては不便です。間違って会社のアカウントで登録してしまって、慌てて削除したなんて経験がある人がいるかも知れません。
そこで使ってみたいのがGit Identity Managerです。複数のアカウント設定を簡単に切り替えられるソフトウェアです。
Git Identity Managerの使い方
アカウントの追加はaddを使います。名前、メールアドレス、SSHキーのパスはセットです。
git idm add jcool --name "Joe Cool" --email [email protected] --key ~/.ssh/id_rsa
登録したら、listで登録内容を確認できます。
$ git idm list personal name=Atsushi [email protected] sshkey=~/.ssh/id_rsa sshcommand=ssh -i ~/.ssh/id_rsa -o IdentitiesOnly=yes -F /dev/null work name=Atsushi [email protected] sshkey=~/.ssh/id_rsa sshcommand=ssh -i ~/.ssh/id_rsa -o IdentitiesOnly=yes -F /dev/null
使う時には use を使います。
git idm use work
そうすると設定が変わっているのが分かります。
$ git config -l credential.helper=osxkeychain user.name=Atsushi [email protected] user.activeidm=personal
すぐに戻せます。
$ git config -l credential.helper=osxkeychain user.name=Atsushi [email protected] user.activeidm=work
企業で開発を行っている時に、アカウントをその企業のものとするケースはよくあります。しかし個人の開発もGitで行っていたら、その切り替えは手間に感じるでしょう。Git Identity Managerならば一瞬で切り替えられるのでとても簡単です。
Git Identity ManagerはShellスクリプト製のオープンソース・ソフトウェア(MIT License)です。
samrocketman/git-identity-manager: Git identity manager. It allows you to switch between git identities for user, name, and SSH private key used for authoring and publishing git commits.
0 notes
Text
How to Disable MSI in Magento 2?
Multi-Source Inventory (MSI) allows managing multiple inventory sources for one or more websites. In spite of its advantages, it lacks in managing if the order is placed from different sources and locations.
Thus, inactivating MSI is a better option. How to Disable MSI in Magento 2 describes the command to accomplish it for different versions of Magento.
0 notes
Link
0 notes
Link
The Pico (Pine composer) is a text editor for the Unix and Unix-based computer systems.
0 notes
Text
Subir un fichero por SSH a un servidor Linux desde PowerShell en Windows
Subir un fichero por SSH a un servidor Linux desde PowerShell en Windows
Set-SCPFile -LocalFile .\index.html -ComputerName 192.168.1.162 -RemotePath . -Credential (Get-Credential) Invoke-SSHCommand -Index 0 "ls index.html" Invoke-SSHCommand -Index 0 "ls -la index.html"
Ver el fichero subido en el servidor Linux
Ver el fichero subido en el servidor Linux desde PowerShell
(Invoke-SSHCommand -Index 0 "cat index.html").output
View On WordPress
0 notes
Text
Analizar el rendimiento de Linux realizando una conexión SSH desde PowerShell en Windows
Analizar el rendimiento de Linux realizando una conexión SSH desde PowerShell en Windows
New-SSHSession -ComputerName 192.168.1.162 -Credential (Get-Credential) #analizar.txt: #uptime #dmesg #vmstat #mpstat -P ALL #pidstat #iostat -xz #free -m #sar -n DEV #sar -n TCP,ETCP #ps gc analizar.txt | %{ $_ $resultado=Invoke-SSHCommand -Index 0 $_ "---------------------------------------------------------------" | Out-File resultado.txt -Append $resultado.Output | Out-File resultado.txt…
View On WordPress
0 notes
Text
Crear y ejecutar un script de Bash realizando una conexión SSH a un contenedor Docker desde PowerShell en Windows
Crear y ejecutar un script de Bash realizando una conexión SSH a un contenedor Docker desde PowerShell en Windows
Crear contenedor Docker con el servidor SSH
docker container run -d -p 2222:22 --name test_sshd2 rastasheep/ubuntu-sshd:16.04 docker ps -a
Crear y ejecutar un script de Bash realizando una conexión SSH a un contenedor Docker desde PowerShell en Windows
New-SSHSession -ComputerName 192.168.1.36 -Port 2222 -Credential (Get-Credential) Invoke-SSHCommand -Index 0 'echo "echo hola" > script3.sh'…
View On WordPress
0 notes
Text
SSH desde PowerShell
Instalar el módulo Posh-SSH (cambiar la política de ejecución de scripts, es necesario ser administrador en PowerShell)
Import-Module Posh-SSH
Iniciar una sesión SSH
New-SSHSession -ComputerName 192.168.1.161 -Credential (Get-Credential)
Ver la sesión SSH iniciada y ejecutar algún comando en Linux
Get-SSHSession Invoke-SSHCommand -Index 0 "uname"
View On WordPress
0 notes