The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘openSuSE’ Category

Passwordless SSH

Posted by jpluimers on 2019/01/22

Note: if the system you SSH from is ever compromised, then assume the passwordless targets are also compromised!

–jeroen

Posted in *nix, *nix-tools, Communications Development, Development, Internet protocol suite, Linux, openSuSE, Power User, SSH, SuSE Linux, TCP, Tumbleweed | Leave a Comment »

Testing SMTP from the console on Linux, BSD and Mac OS: swaks and smtp-cli Perl script clients

Posted by jpluimers on 2019/01/03

Testing SMTP using telnet is tedious as you have to remember the commands and responses in the SMTP protocol. It gets even harder when doing SMTP AUTH, as then you have to base encode a bunch of strings [WayBackHow to Test SMTP AUTH using Telnet [Wiki] | NDCHost

Luckily there is a Perl script swaks: [WayBackSwaks – Swiss Army Knife for SMTP which does ESMTP and LMTP as well as TLS.

The funny thing is that the repository at jetmore/swaks: Swaks – Swiss Army Knife for SMTP only has the readme, but the not the script which you can get from [WayBack] swaks.pl.

Despite that, most Linux distributions have an installation package.

[WayBackswaks for OpenSuse is in the [WayBacknetwork repository, so for Tumbleweed (actually: Factory) on Raspberry Pi you need to perform this:

zypper addrepo http://download.opensuse.org/repositories/network/openSUSE_Factory_ARM/network.repo
zypper refresh
zypper install swaks

On Mac OS X it is even easier: if you have the homebrew package manager installed, you just install the [WayBackswaks formula using the [WayBack] swaks.rb script:

brew install swaks

Note there is also the smtp-cli Perl script which I mentioned before at Fake/Mock SMTP servers and services for use during development, which also does TLS, but few environments have ready built packages for them. If you still want to try it out:

For SMTP AUTH:

swaks -tls --to jeroen.wiert.me@pluimers.com --from jeroen.wiert.me@pluimers.com --server smtp.xs4all.nl --auth-user username

Which prompts for the password, then outputs like this:

=== Trying smtp.xs4all.nl:25...
=== Connected to smtp.xs4all.nl.
<- 220 smtp-cloud3.xs4all.net ESMTP ESMTP server ready -> EHLO rmbpro1tbjwp
<-  250-smtp-cloud3.xs4all.net hello [188.206.68.219], pleased to meet you
<-  250-HELP
<-  250-AUTH LOGIN PLAIN
<-  250-SIZE 157286400
<-  250-8BITMIME
<-  250-STARTTLS
<- 250 OK -> STARTTLS
<- 220 Ready to start TLS === TLS started with cipher TLSv1:DHE-RSA-AES256-SHA:256 === TLS no local certificate set === TLS peer DN="/OU=Domain Control Validated/OU=PositiveSSL Wildcard/CN=*.xs4all.nl" ~> EHLO rmbpro1tbjwp
<~  250-smtp-cloud3.xs4all.net hello [188.206.68.219], pleased to meet you
<~  250-HELP
<~  250-AUTH LOGIN PLAIN
<~  250-SIZE 157286400
<~  250-8BITMIME
<~ 250 OK ~> AUTH LOGIN
<~ 334 ############ ~> anA=
<~ 334 ############ ~> ############################
<~ 235 ... authentication succeeded ~> MAIL FROM:<jeroen.wiert.me@pluimers.com>
<~  250 <jeroen.wiert.me@pluimers.com> sender ok
 ~> RCPT TO:<jeroen.wiert.me@pluimers.com>
<~  250 <jeroen.wiert.me@pluimers.com> recipient ok
 ~> DATA
<~ 354 enter mail, end with "." on a line by itself ~> Date: Wed, 19 Jul 2017 09:09:57 +0200
 ~> To: jeroen.wiert.me@pluimers.com
 ~> From: jeroen.wiert.me@pluimers.com
 ~> Subject: test Wed, 19 Jul 2017 09:09:57 +0200
 ~> Message-Id: <20170719090957.052207@rmbpro1tbjwp>
 ~> X-Mailer: swaks v20170101.0 jetmore.org/john/code/swaks/
 ~> 
 ~> This is a test mailing
 ~> 
 ~> .
<~ 250 smtp-cloud3.xs4all.net accepted mail mXA71v00C4jr6ac01XA9Bo for delivery ~> QUIT
<~  221 smtp-cloud3.xs4all.net ESMTP closing connection
=== Connection closed with remote host.

–jeroen

Posted in *nix, *nix-tools, Communications Development, Development, Hardware Development, Internet protocol suite, Linux, openSuSE, Power User, Raspberry Pi, SMTP, SuSE Linux, Tumbleweed | Leave a Comment »

Easy Running of Scripts at Boot and Shutdown – SUSE Blog | SUSE Communities

Posted by jpluimers on 2019/01/01

Cool:

/etc/init.d/after.local

–jeroen

Posted in *nix, *nix-tools, bash, Development, Linux, openSuSE, Power User, Scripting, Software Development, SuSE Linux, Tumbleweed | Leave a Comment »

zypper history notes/links

Posted by jpluimers on 2018/12/31

For my archive:

cut -d "|" -f 1-4 -s --output-delimiter " | " /var/log/zypp/history | grep -v " radd "

For comparisons with other package managers, see: [WayBackLinux Package Managers – Kyle’s Wiki

–jeroen

Posted in *nix, Debian, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed, Ubuntu | Leave a Comment »

Reptyr – Forgot to “screen” your ssh session first, and now that long running…

Posted by jpluimers on 2018/12/24

From a while back, but still so cool! It allows you to “recover” the terminal (stdin/stdout/stderr) of a process that was attached to a terminal or ssh session.

Reptyr – Forgot to “screen” your ssh session first, and now that long running thing is stuck?

»reptyr PID will grab the process with id PID and attach it to your current terminal.«

server:~ # zypper install reptyr
...
Retrieving: reptyr-0.3dev_git20120325-7.1.2.x86_64.rpm ...................[done]
(1/1) Installing: reptyr-0.3dev_git20120325-7.1.2 ........................[done]
server:~ # rpm -qi reptyr
...
Summary     : A tool for "re-ptying" programs
Description :
reptyr is a utility for taking an existing running program and
attaching it to a new terminal. Started a long-running process over
ssh, but have to leave and don't want to interrupt it? Just start a
screen, use reptyr to grab it, and then kill the ssh session and head
on home.
Distribution: openSUSE 13.1

Source: [WayBack] Reptyr – Forgot to “screen” your ssh session first, and now that long running thing is stuck?… – Kristian Köhntopp – Google+

It works with tmux too and is supported on many Linux distributions, see for instance [WayBackReptyr – Move A Running Process From One Terminal To Another Without Closing It – OSTechNix.

You can even redirect a pty for gdb usage: [WayBackreptyr(1): new terminal – Linux man page

StackExchange thread: [WayBack] How to recover a shell after a disconnection with these entries:

Originally from 2011 [WayBackreptyr: Attach a running process to a new terminal – Made of Bugs it is still maintained:

GitHub repository [WayBacknelhage/reptyr: Reparent a running program to a new terminal

–jeroen

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, screen, SuSE Linux, tmux | Leave a Comment »

Links for Nagios openSuSE Tumbleweed monitoring (including Android devices)

Posted by jpluimers on 2018/12/13

For my link archive:

Non-stable repos:

–jeroen

Posted in *nix, Linux, Monitoring, Nagios, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

listing files with ISO 8601 time stamps on *n*x flavours

Posted by jpluimers on 2018/12/05

A (long!) while ago, I wrote about list date with seconds from ls command – Dev Shed that showed how to list the full ISO timestamp (including seconds) of files.

This is an update.

The previous post showed that you could use this statement to list all files with their full ISO timestamps (and therefore get both the seconds and milliseconds) on (open)SuSE Linux, Mac OS X and Cygwin:

ls -l --time-style=full-iso

What Linux and displaying dates in ISO 8601 format… : Little Green Delusions proposes are two solutions to make this more permanent:

alias ls='ls -l --time-style=long-iso'

or edit one of your profile files (he prefers /etc/profile.local, but that is system wide, so I usually prefer ~/.bash_profile) to add this line:

export TIME_STYLE=long-iso

The thing is: I do not always want to have ls -l show ISO 8601 dates. I like the way that ls-l lists timestamps for very old or future files:                 Read the rest of this entry »

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »

how can I free up space on /boot as “openSUSE-2014-462” fails to install on openSUSE 12.3 x86_64

Posted by jpluimers on 2018/11/30

From a long time ago:

[WayBackhow can I free up space on /boot as “openSUSE-2014-462” fails to install on openSUSE 12.3 (x86_64):

Installation of kernel-desktop-3.7.10-1.40.1 failed:
(with --nodeps --force) Error: Subprocess failed. Error: RPM failed:     installing package kernel-desktop-3.7.10-1.40.1.x86_64 needs 16MB on the /boot filesystem

Based on that thread, I figured out the steps:

Read the rest of this entry »

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »

SSH: Connection Reset by Peer – Server Fault

Posted by jpluimers on 2018/11/22

One occasion I had SSH throw a Connection Reset by Peer on my when was the SD-card of a Raspberry Pi started failing and the ext4 filesystem got mounted in read-only mode.

Then sshd was still listening on port 22, but since it could not write to disk any more, it threw a Connection Reset by Peer to the client.

It was on OpenSuSE Tumbleweed, but would failed just as well using Raspbian.

Lessons learned:

  • IoT hardware will fail.
  • ext4 breaks when the hardware breaks.

–jeroen

Reference:

Posted in *nix, *nix-tools, Debian, Development, Hardware Development, IoT Internet of Things, Linux, Network-and-equipment, openSuSE, Power User, Raspberry Pi, Raspbian, SuSE Linux, Tumbleweed | Leave a Comment »

Install on openSUSE / SLES – Zabbix.org

Posted by jpluimers on 2018/10/29

Interesting: [Archive.isInstall on openSUSE / SLES – Zabbix.org is possible and there are packages for this on the OpenSuSE site itself for the various kinds of distributions.

For instance, Tumbleweed is at http://download.opensuse.org/repositories/server:/monitoring/openSUSE_Tumbleweed/

Good introductions on Zabbix are via [WayBackStephen Fritz on Systems Engineering: Installing and Configuring Basic Zabbix Functionality on Debian Wheezy who has a [Archive.is] zabbix tag.

Other links are at Welcome to workaround.org – tips around open source and Linux stuff.

And there is www.zabbix.com/documentation

–jeroen

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »