We perform direct numerical simulations of turbulent channels whose inner layer is replaced by an off-wall boundary condition synthesized from a rescaled interior flow plane. The boundary condition is applied within the logarithmic layer, and mimics the linear dependence of the length scales of the velocity fluctuations with respect to the distance to the wall. The logarithmic profile of the mean streamwise velocity is recovered, but only if the virtual wall is shifted to a position different from the location assumed by the boundary condition. In those shifted coordinates, most flow properties are within 5–10 % of full simulations, including the Kármán constant, the fluctuation intensities, the energy budgets and the velocity spectra and correlations. On the other hand, buffer-layer structures do not form, including the near-wall energy maximum, and the velocity fluctuation profiles are logarithmic, strongly suggesting that the logarithmic layer is essentially independent of the near-wall dynamics. The same agreement holds when the technique is applied to large-eddy simulations. The different errors are analysed, especially the reasons for the shifted origin, and remedies are proposed. It is also shown that the length rescaling is required for a stationary logarithmic-like layer. Otherwise, the flow evolves into a state resembling uniformly sheared turbulence.