Hot answers tagged

24

Try Mosh. Mosh (mobile shell) Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes. Mosh is a replacement for SSH. It's more robust and responsive, especially over Wi-Fi, cellular, and long-distance links. Mosh is free software, available ...


19

You can restrict commands using the authorized_keys file. Put command="/home/rpcall/bin/command.sh" before the key, in the authorized_keys file, and the user will only ever run that command when they connect. Check the man page for authorized_keys, this is from that man page, command="command" Specifies that the command is executed whenever this ...


17

From Forwarding to More than One Server; What is important to know, however, is that the full set of directives make up an action. So you can not simply add (just) a second forwarding rule, but need to duplicate the rule configuration as well. Be careful that you use different queue file names for the second action, else you will mess up your system. ...


16

I had the issue on Windows 10 with perma asking password when I try to connect to a new machine. First, the password line in the RDP must be named: password 51:b:myEncryptedPassword And the pass must by encrypted. You can use cryptRDP5 to convert it: https://github.com/jps-networks-modifiedOSS/openvpn-als-applications/tree/master/adito-application-rdp-...


11

By design, you are not really supposed to be able to launch processes in other people's sessions. (To clarify, even if you are logged on interactively at a computer desktop, and also have another separate network logon to the same machine at the same time using the same credentials, those still count as two different logon sessions.) This is simply against ...


11

Open the Group Policy editor (Start > Run > gpedit.msc) and navigate to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Connection Client For value Do not allow passwords to be saved, check that is set to Disabled. When connecting to a machine in Remote Desktop Connector, expand the ...


10

an alternative (and also in addition) to dmourati answer: use screen or tmux or other things, to keep sessions alive when you are disconnected. (You simply re-attach to the session after you reconnect, and see the terminal as you left it, even with full screen programs [vi, etc]). It also have many other benefits (sharing sessions with co-workers, etc) (as ...


8

why not try and connect to the remote machine and start the transfer from there. If you are using ssh-keys you can use agent pass though to manage the authenticate for you. ssh -A remotehostA rsync /remote/file/on/host/a remoteHostB:/destination/ This command will log you on the remoteHostA and run rsync from there.


8

You haven't show us what you've tried so far, but something as simple as this should work: ssh -L 8080:private.remoteserver:8080 remoteserver Which would then let you run: curl http://localhost:8080/ ...which due to the port forwarding we just set up would actually connect to port 8080 on private.remoteserver. If you want to be able to directly access ...


7

MAC addresses are Ethernet things, not Internet things. A computer need not even have a MAC address. The only way to get the MAC address is to get some computer on the same LAN as that computer to tell it to you. And you'd have no way to know it was giving you the correct information. If the two of you are in the same Ethernet LAN, you can just ping the ...


7

How is it possible to start processes that are actually visible on the Windows machine? A good start would be by creating the process in the session of the currently logged on user. That's usually session 1 if there's only one person logged on. If multiple people are logged on, it might be session 2 or 3 or 27. You'd have to run code in wtsapi32.dll ...


7

As @Zoredache points out, ssh relays the status of the remote command as its own exit status, so error detection works transparently over SSH. However, two important points require special consideration in your example. First, curl tends to be very lenient, treating many abnormal conditions as success. For example, curl http://serverfault.com/some-non-...


7

Classic firewall issue. Microsoft RPC high ports default to tcp/49152 - tcp/65535 on Windows 7/2008. Unless you have specified a custom RPC port range. The particular RPC endpoint in question is the Service Control Manager Remote Protocol (SCMR). If you run a packet capture at the time you run the sc command, you will see the port(s) in use. First it ...


6

You can get it from WMI, and any language that can read WMI will be able to access it. VBScript, JScript, Perl, Python, and Powershell can all be used to get to it. Since you asked specifically Powershell, here's an example from http://www.neolisk.com/techblog/powershell-getmacaddressofanyremoteip: param ( $Computer , $Credential ) #to make it work ...


6

nmap will return the MAC address as well as just about anything else you'd like to know. If you have admin access to the machine, powershell & wmi are both very useful in getting remote diagnostics. They both have extensive documentation at technet.microsoft.com edit: this assumes a windows machine, which from the looks of it, this might not be.


6

My solution involves a multi step approach doing some of the above, but also involving a chroot in ram that should allow dd to finish completely clearing the disk. First delete all of your sensitive data, leaving necessary files for running the operating system. Then do this (not in a script, do it one command at a time): mkdir /root/tmpfs/ mount -t tmpfs ...


6

Netsend messages have been removed from Windows 7. One way I have found to do this without installing 3rd party software is to leverage the remote shutdown commands: shutdown -m \\computername -r -f -c "MESSAGE" -t 120 shutdown -m \\computername -a The first command pops a message up, and will begin the shutdown in 120 seconds, the second command ...


6

Create alias for beep to echo -en "\007" (beep (bell) character) Normally beep is using your pc speaker, not terminal bell


6

Sure, just use the mapping under net use. They won't have a drive letter assigned, just a mapping. Most of the time it will be listed as something like \\TSCLIENT\C or similar. Then just run the command with the path being something like \\TSCLIENT\C\Users\bob\Desktop or whatever. For instance, to get a sorted directory listing of the root of C on my ...


6

The service controller uses a dynamic RPC port, which is identified after talking to the RPC Endpoint Mapper on port 135, as mentioned by Greg Askew. Windows Firewall can be configured to allow the RPC dynamic ports through without any registry editing or RPC reconfiguration: Open Windows Firewall with Advanced Security. Create a new inbound rule with the ...


6

I was able to get this working using PsExec as mentioned in another answer. Download PSTools Unzip to C:\Windows\PSTools Add C:\Windows\PSTools to your PATH Get process ID of RDP session (tasklist will work, or a fancy one-liner: $session = tasklist /fo CSV | findstr RDP ; $session = $session.Split(",")[3] ; $session.Split('"')[1]) Start process: PsExec.exe ...


6

Apparently this is an issue with the Group Policy client when enabling "Remote Service Management". The fix is to run the following command: netsh advfirewall firewall set rule name="Remote Service Management (RPC)" profile=domain new enable=yes I did this in bulk, remotely, using PsExec (which ran slowly) as follows, given the affected workstations, one ...


6

Are the appropriate protocols enabled in SQL Configuration Manager? My guess is they're not. Check that first.


5

Very grateful to everyone's comments, but here is the answer: http://blogs.msdn.com/b/vistacompatteam/archive/2006/09/22/766945.aspx There is a registry setting HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system\LocalAccountTokenFilterPolicy Which impacts this. If I set that registry entry to 1, everything works as expected - users in ...


5

scp -3r <remote src> <remote dest> has no trouble doing this.


5

You need a router in both of your locations. Set the default route on both of them to the local broadband gateway. On the remote router set a route to 192.168.16.0 using the wireless link and in your main router a route to 192.168.0.0 using wireless.


5

Buy computers with Intel vPro built into the chipset or ship them to your end users with KVMoIP cards.


5

I think the problem might be with the way you're generating the credential using ConvertTo-SecureString. By default, that cmdlet uses an encryption key specific to the current host (I think) unless you provide an explicit encryption key with the -Key parameter. On the remote side, it needs to decrypt the string using the same encryption key which it doesn'...


5

You can create a 'callable hook' on the remote machine: It's a scheduled task set to "run only when user is logged on," assigned to run under the account of the user who will be logged in upon execution. The action of the task is the executable you want to run. Scheduled tasks can be created remotely via powershell or schtasks, and subsequently called ...


5

The only way for domain computers to get updated group policy settings is if they have connectivity to a domain controller at a time when they are refreshing their group policy settings. Group Policy is refreshed: At computer startup (foreground refresh of Computer settings) At user logon (foreground refresh of User settings) Periodically in the background (...


Only top voted, non community-wiki answers of a minimum length are eligible