yet another SSH question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
There is a LAN of machines: 192.168.3.13, 192.168.20.5, 192.168.20.10, 192.168.20.20, 192.168.20.30, 192.168.20.50.
These are all accessible from each other via ssh, scp, ping, etc.  One of these machines 192.168.3.13 is accessible
also via the internet.

using port redirection (and I do set OUTSIDEIP to the IP address.,  I just am not publishing it here, for security)
I create something called sstest:

ssh -X -oBatchMode=yes -o TCPKeepAlive=yes -l support1 -L 10005:192.168.20.5:22 -L 10010:192.168.20.10:22 -L 10020:192.168.20.20:22 -L 10030:192.168.20.30:22 -L 10040:192.168.20.40:22 -L 10050:192.168.20.50:22 $OUTSIDEIP
(this is actually one line long it just wraps.  Anyway this allows me to do things like

     ssh -l root -p 10005 localhost           # ssh to 192.168.20.5
     scp -P 10020 root@localhost:file .    # scp file "file" from 192.168.20.20

etc.  This works fine.

My problem is I want a cron job to do it.  So I would have to execute sstest with an ampersand like ./sstest & ).
However, when I put sstest into the background like that, then none of the port forwarding ssh and scp commands
works.

I want the cronjob to execute a script that does something like this:

     ./sstest &
   scp -P 10010 root@localhost:file.txt .

any suggestions?

TOny

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux