Бывает такие случаи, когда при использовании RDP (Remote Desktop Protocol — протокол удалённого рабочего стола), не видно программ, которые установленные в системном трее, или ошибки и уведомления просто не отображаются. Для того, чтобы решить данную проблему, к терминальному северу можно подключиться в консольном режиме через тот же RDP.
Удаленный рабочий стол (Remote Desktop Protocol) или RDP — это технология дистанционного подключения к компьютеру (серверу), для непосредственного управлению им через локальную сеть или интернет. Я уже рассказывал о данной технологии в видеоуроке «Подключение к компьютеру через удаленный рабочий стол».
Использование, каких-либо программ удаленного администрирования для подключения к рабочему столу напрямую не всегда удобно, например, при нестабильной связи или ограничении времени сеанса. Так вот в данной статье мы расскажем, о нехитрой вещи, которую некоторые коллеги возможно не знали.
При использовании клиента удаленного рабочего стола (RDP) Windows, в качестве средства подключения к компьютеру с Windows Server 2003/2008/2012 с запущенной службой сервера терминалов, у вас есть возможность подключения на консоль сервера. Используя эту опцию, вы можете войти на сервер, так, как если бы вы сидели прямо перед ним, а не создавать новые сессии через сетевое подключение. Дело в том, что при удаленной установке некоторых программ, могут возникнуть проблемы, которые не позволят вам сделать это из терминальной сессии, поэтому вам понадобиться войти на сервер через консоль.
Включение удаленного доступа на своем компьютере.
Для того, чтобы настроить удаленный доступ на целевом компьютере, владелец или администратор должен выполнить следующие действия (Мой компьютер \ Свойства \ Настройка удаленного доступа \ Удаленный доступ \ Разрешить подключение от компьютеров с любой версией удаленного рабочего стола).
Если хотите пускать в свой компьютер только определённых пользователей или группы пользователей вашей сети, то необходимо поставить галочку «Разрешить подключение с компьютеров, на которых работает удаленный рабочий стол с проверкой подлинности на уровне сети (рекомендуется)».
Как же подключиться к удаленному рабочему столу?
Это конечно же стандартными средствами Windows (Пуск \ Все программы \ Стандартные \ Подключение к удалённому рабочему столу)
Или через команду Выполнить (Win+R) и вводим команду mstsc. Это более быстрый способ и его используют в основном админы и разработчики программ, т.к. часто приходится подключаться к удаленным рабочим столам серверов.
Как же подключиться к консоли удаленного рабочего стола?
Для этого в появившемся окне вбиваем команду:
— Windows Server 2003 и Windows XP: mstsc /console
— Windows Server 2008/2012 и Windows 7/8/8.1: mstsc /admin
Вводим имя терминального севера или компьютера.
И вводим учетные данные пользователя имеющего права для удаленного подключения.
Так как RDP по умолчанию создаёт виртуальную консоль, то подключение происходит не к самой сессии, а непосредственно к консоли (основная консоль-мышь/клавиатура).
Какая разница между простым подключением к удаленному рабочему столу и подключением к консоли?
— Подключение через консоль — доступно только администраторам и фактически приравнивается к обыкновенному входу в систему. Тогда как простое подключение по rdp — это терминальная сессия, соответственно то программное обеспечение, которое сопротивляется запуску под терминальной сессией, под консолью может вполне успешно работать.
— В первом случае создается новая сессия (mstsc), параллельная с существующей. Во втором случае подключение осуществляется к своему рабочему столу (в рамках лицензий на терминал).
Have you ever needed to execute a command or to connect to an interactive text console on a remote Windows station?
Probably several times, and usually, you had to log in using either VNC or RDP (Remote Desktop Protocol – Microsoft Terminal Services). If you’re used to SSH, you may wonder why the overhead of a complete desktop is needed just to start a few text commands. Of course, there are free and commercial SSH servers for Windows, but one problem with them is that they have to be installed separately. Which may be too much work for a one-off task now and then. Are there any other methods of accessing a remote Window text console from your Linux station?
But hey, here comes winexe to the rescue! Below, accessing Windows CLI from Linux remotely (using a Windows domain account):
From the project’s page, “winexe remotely executes commands on WindowsNT/2000/XP/2003 systems from GNU/Linux (probably also other Unices capable to compile Samba4)“.
Some notes:
- note that winexe doesn’t offer encryption of any kind – you may want to use VPN to make sure your connection is secure,
- if your distribution doesn’t offer a packaged version of winexe (most distributions don’t), winexe homepage offers a static binary; on the other hand if you have a recent Linux distribution, the static binary will most probably not work for you – in that case, just build the tool from source,
- you can use winexe in your Linux scripts – this way, you may execute certain tasks on your Linux machines, other tasks on your Windows machines – all that as a part of one bigger task / script,
- winexe can be seen as a Linux equivalent of psexec (a similar tool available for Windows).
Useful examples:
See the list of processes / logged in users. Useful if you want to log in via RDP but don’t want to interrupt user session. Useful in a script, to check more workstations.
Start cmd.exe console:
Different Ways to Accessing Windows Console Remotely From Linux
There are a few different ways you can access the Windows console remotely from Linux. Here are a few options you can try:
- Use a Remote Desktop Protocol (RDP) client. RDP is a proprietary protocol developed by Microsoft that allows you to remotely access the desktop of a computer running Windows. There are several RDP clients available for Linux, including
rdesktop
andFreeRDP
. - Use Secure Shell (SSH) and a terminal emulator. SSH is a network protocol that allows you to securely connect to a remote computer and run commands on that computer. You can use a terminal emulator like
xterm
orgnome-terminal
to connect to a Windows machine via SSH. - Use a VNC client. VNC (Virtual Network Computing) is a protocol that allows you to remotely access the desktop of a computer running any operating system. There are several VNC clients available for Linux, including
vncviewer
andtightvncviewer
.
I hope this helps! Let me know if you have any questions or if you need further assistance.
Great! You’ve successfully signed up.
Welcome back! You’ve successfully signed in.
You’ve successfully subscribed to Lxadm.com.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.
Introduction:
Remote Desktop Protocol (RDP) sessions can have multiple instances with the same user account. This may be undesirable or misleading if access to the machine is primarily remote. Connection to the RDP session can be achieved through the command line, and constrained to the “console” session, which would be the locally accessible session.
Requirements:
Procedure:
Acquire access to the Windows command line (cmd.exe). This can be done by pressing the Windows key and the r key on the keyboard, then by typing
cmd
and pressing enter. Next, type the following:
mstsc /console /V:address
This will start a Remote Desktop Protocol connection to the console session of the remote machine. The “address” field should be replaced with the address of the remote machine. The program launched is also known as Microsoft Terminal Server Connection. Once you launch the mstsc program with the correct address and switches as indicated above, you will be able to login with the desired account. This will be the account’s console session.
More Information:
Type:
mstsc /?
for more information on command line switches for the mstsc program.
Posted: November 23, 2008/Under: Operating Systems/By:
Whenever user uses “Remote Desktop Connection (RDC)” or Terminal Services client (TSC or mstsc) to remote desktop to a Windows Server family operating system such as Windows Server 2003 and Windows Server 2008, a new session is started and user will log on to a new desktop. The behavior is unlike Windows XP and Windows Vista Terminal Services which always allows remote desktop to access to console session (the same desktop in which user will see when standing in front of the monitor).
For user who need to connect and access console session with Remote Desktop can use a switch when running Remote Desktop Connection Terminal Services client (mstsc) in order to force Remote Desktop to connect to console session of remote server.
To connect to console session of Windows Server 2003 or Windows Server 2008, run the RDC or TSC with the following switch: /console. For example, for all remote desktop client except the one in Windows Vista:
mstsc /console
For Windows Vista remote desktop client, use /admin switch instead:
mstsc /admin
By logging in to console session of remote computer, all existing applications that are running and not yet closed when user is physically using the computer will be automatically appeared, instead of having users re-open all of them.