Direct connect linux to linux

atweiden / connect-linux-ethernet-lan-ssh.md

Ethernet interface name is traditionally eth0 . On systemd machines, the default differs. Find it by running inxi -i as above.

Alternatively, run ip addr and pick the second result. The name will look similar to enp4s0f2 .

$ ip addr 1: lo: LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp4s0f2: BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 30:02:06:bc:ab:14 brd ff:ff:ff:ff:ff:ff

Start ifplugd service on master

With the ethernet interface name on master obtained, start the ifplugd service:

systemctl start ifplugd@enp4s0f2

Install dependencies on slave

pacman -S ifplugd inxi openssh

Obtain ethernet interface name on slave

$ inxi -i Network: Card-1: Intel Gigabit Network Connection driver: e1000e IF: enp0s25 state: down mac: 73:2c:4b:e8:7b:76

Alternatively, run ip addr and pick the second result. The name will look similar to enp0s25 .

$ ip addr 1: lo: LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp0s25: BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 73:2c:4b:e8:7b:76 brd ff:ff:ff:ff:ff:ff

Start ifplugd service on slave

With the ethernet interface name on slave obtained, start the ifplugd service:

systemctl start ifplugd@enp0s25

Directly connect master and slave ethernet ports with cat cables (such as standard CAT5e).

Check to make sure both ends of the ethernet cable are plugged in all the way. Run this command on both master and slave:

Obtain the IPv6 address on slave ethernet interface:

ifconfig | grep inet6 | head -n 1 | awk »

$ inxi -ix WAN IP: None Detected! IF: enp0s25 ip-v4: N/A ip-v6: fe80::6497:17de:fee3:1942

In the inxi output, look for IF: (your ethernet interface name) , then copy the ip-v6 value.

ssh user@fe80::6497:17de:fee3:1942%enp4s0f2

rsync from master to slave

rsync \ --recursive \ --perms \ --human-readable \ --progress \ --verbose \ -e ssh \ /path/to/src \ user@[fe80::6497:17de:fee3:1942%enp4s0f2]:/path/to/dest
rsync \ --recursive \ --perms \ --human-readable \ --progress \ --verbose \ -e ssh \ /path/to/src \ $ @[$ %$ ]:/path/to/dest

Putting brackets around the slave IPv6 address is required.

Источник

Connect:Direct From Linux server to Unix

Solution: From the documentation ( IBM Sterling Connect:Direct for z/OS User Guide ): Combine that with this reference ( Sterling Connect:Direct for Microsoft Windows System Guide — it is probably also detailed elsewhere in the Windows documentation for Connect:Direct) The line you want to understand is this: On each of those two lines, the first and last backslashes (\) are for this reason: and Sterling Connect:Direct will resolve it to this: Windows will be presented with And Windows will then do its escape-processing, giving you this: This particular use of the backslash (\) is due to the presence of the continuation character (the — as the last character on the line) and the presence of special characters (what those are is listed in the documentation), not due to the use of the concatenation (||) (which, for information, is whatever symbol in the character-set you are using is X’4F’, which is not necessarily the | symbol).

Connect:Direct From Linux server to Unix

there are 4 files which will be generated each day in a Linux server . the files has to be sent daily via connect direct to another server which is in unix.

eg..ABC_1JUNE.txt, BCD_1JUNE.txt, CDE_1JUNE.txt, DEF_1JUNE.txt

how to do this in shell script.

To schedule daily jobs on a UNIX-like system you can usually do that with cron. Create a script for that job in the /etc/cron.daily directory on the Linux server and have the cron daemon run it automatically. The script should simply contain the commands to be run. In this case it could look something like this:

#!/usr/bin/env bash source= destination=: suffix=1JUNE.txt for file in _$; do scp "$source/$file" "$destination" done 

This assumes there is a SSH daemon running on the remote server that you can connect to with scp . Replace the values for source and desination to match your real server name and file structures. The source here could also be a remote server.

mount the target server shared folder in the source server folder (or vice versa) and copy the files there using cp command. For filesystem mount : http://linux.about.com/od/commands/l/blcmdl8_mount.htm Remote mounting

Configure Operator Connect, Check that the user is assigned a Direct Routing number by running the Teams PowerShell Module command: Get-CsPhoneNumberAssignment -AssignedPstnTargetId Check that NumberType is DirectRouting. How you remove your existing Direct Routing numbers depends whether the number is …

Connect:Direct syntax on IBM z/OS Mainframe

I am writing a C# program to parse a Connect:Direct file and extract from it source and destination information.

I am not very fluent with mainframe code . In particular, I am trying to understand the syntax of the destination Windows path. The following is my interpretation but there are holes that I want to fill in order to write a parser that is able to handle any valid syntax variation that I may encounter.

The backslash character must be an escape character, so that two backslashes represent one. However the concatenation operation, || , seems to throw a monkey wrench in that. I presume that the slash character is the line continuation character . The quoted path also is enclosed with a backslash on each side. I’m not sure what this indicates. I’m guessing that it may mean that the enclosed string contains escape characters, suggesting that two backslashes should equal one.

NDMHGM30 PROCESS SNODE=MYSNODE PACCT='G,HG1' - &SUBS=SUBSYS(ESP2) - &DMNDH=ESPM2D.DEMANDH - &APPL=APPL(STHG102M.0) STEP1 COPY FROM (PNODE DSN=GIO.HG1.CDB.ACCTEXT.T1(0) - DISP=SHR) - COMPRESS EXT - TO (SNODE - DSN=\'\\\\MyServerName\\IMDATA\\CLASS_SOURCE\\SYSTEM_INPUTS\ || - \\\CDB\\ACCOUNT.TXT'\ - SYSOPTS="STRIP.BLANKS(NO)" - DISP=RPL) IF ( STEP1=0 ) THEN STEP1A RUN TASK (PGM=ESP, - PARM=("&SUBS NOSTACK;AJ USERREQ.GHG30GOD &APPL COMPLETE;END")) ELSE STEP1B RUN TASK (PGM=ESP, - PARM=("&SUBS NOSTACK;****;DMNDH USER1('GHG30BAD');END")) EIF 

Any wrong assumptions so far?

Given that, I would expect that the above path would be invalid because it would be interpreted as

\\MyServerName\IMDATA\CLASS_SOURCE\SYSTEM_INPUTS\\CDB\ACCOUNT.TXT 

In other words, there would be an extra backslash in one of the levels. But I know that the Connect Direct works and correctly interprets the path as

\\MyServerName\IMDATA\CLASS_SOURCE\SYSTEM_INPUTS\CDB\ACCOUNT.TXT 

How does the concatenation operator and/or line continuation impact the number of slashes that are needed here? What other syntax variables might also be valid that would result in the same valid Windows path?

From the documentation ( IBM Sterling Connect:Direct for z/OS User Guide ):

Special Purpose Bracketing

You must often maintain special characters as part of a string. To maintain special characters, enclose the string in bracketing characters. Bracketing characters are backslashes (\), single quotation marks (‘), and double quotation marks («).

Bracketing backslashes are indicators of special processing of a character string .

Sterling Connect:Direct does not maintain them as part of the string at its final resolution. Use bracketing backslashes to:

1 Continue a string containing special characters across multiple lines

2 Ensure that quotation marks within the string are maintained

The following is an example of using bracketing backslashes in a command: PACCT=\’DEPT\MIS\ || —
\602’\

Sterling Connect:Direct resolves the command as follows:

PACCT=’DEPT\MIS602’

Combine that with this reference ( Sterling Connect:Direct for Microsoft Windows System Guide — it is probably also detailed elsewhere in the Windows documentation for Connect:Direct)

Microsoft Windows Services treats a backslash (\) as an escape character, so type two backslashes for each backslash in the file path.

The line you want to understand is this:

 DSN=\'\\\\MyServerName\\IMDATA\\CLASS_SOURCE\\SYSTEM_INPUTS\ || - \\\CDB\\ACCOUNT.TXT'\ 

On each of those two lines, the first and last backslashes (\) are for this reason:

Continue a string containing special characters across multiple lines

Sterling Connect:Direct does not maintain them as part of the string at its final resolution

Sterling Connect:Direct will resolve it to this:

 DSN='\\\\MyServerName\\IMDATA\\CLASS_SOURCE\\SYSTEM_INPUTS\\CDB\\ACCOUNT.TXT' 

Windows will be presented with

 \\\\MyServerName\\IMDATA\\CLASS_SOURCE\\SYSTEM_INPUTS\\CDB\\ACCOUNT.TXT' 

And Windows will then do its escape-processing, giving you this:

 \\MyServerName\IMDATA\CLASS_SOURCE\SYSTEM_INPUTS\CDB\ACCOUNT.TXT 

This particular use of the backslash (\) is due to the presence of the continuation character (the — as the last character on the line) and the presence of special characters (what those are is listed in the documentation), not due to the use of the concatenation (||) (which, for information, is whatever symbol in the character-set you are using is X’4F’, which is not necessarily the | symbol).

All the Sterling Connect:Direct documentation, for all platforms, is freely available from IBM’s Information Centre, either usable directly online or downloadable as PDFs. Your choice. Just pick your favourite search-engine, and find the documentation for your versions of the product.

Different Ways to Connect One Computer to Another, Step 1: Connect two Computers using an ethernet cable. Step 2: Click on Go->Connect to Server->Browse. Step 3: Double Click on the Second MAC’s name. Step 4: A dialogue box will appear. Enter the second computer’s password to connect to the second computer. Step 5: Click Connect. It’s in the lower-right …

Sending files through connect direct from UNIX to MAINFRAME

I am sending a file from UNIX to MAINFRAME server via connect direct. I am able to upload the file successfully.At the destination host, when the file is received it is not readable and not in the same format as I sent from the UNIX server.

Below is the transmission job

Direct> Enter a ';' at the end of a command to submit it. Type 'quit;' to exit CLI. submit maxdelay=unlimited TINIRS process snode=b1ap005 TRANSMIT copy from (file=myFile.txt pnode sysopts=":datatype=text" ) ckpt=1k to (file=myFile.txt(+1) snode DCB=(DSORG=PS,RECFM=VB,LRECL=1500) disp=(new) ) pend ; 

Please let me know the DCB values needs to be updated. The file I am sending has 3 records of variable length and the maximum length of record is 1500.

Actually, that looks almost right. But if your maximum record length is 1500 characters (exclusive of the NL at the end of the line), your lrecl should be at least 1504. But don’t skimp on the maximum — there’s no cost or penalty to larger values (up to 32767). And NealB’s correct — if this is a text file, you may need to specify a character-set translation — but I don’t know how to do that in CONNECT:Direct.

C:D automatically converts ascii to EBCDIC when DATATYPE=TEXT is used. To be positive, you may want to use «:datatype=text:xlate=yes:».

Access Remote Desktop Via Commandline, To connect to a remote computer with the Terminal Server role service installed, follow these steps: Open the Command Prompt window by clicking the Start button , clicking All Programs, clicking Accessories, and then clicking Command Prompt. Type mstsc /v:server /admin. /f.

Источник

Читайте также:  Пароль суперпользователя astra linux
Оцените статью
Adblock
detector